2016-08-23 12 views
0

gremlin-shell을 통해 Cassandra 백엔드 (로컬 또는 원격)에 그래프 쿼리를 작성하려고합니다.GraphFactory 메시지 : GraphFactory가이 그래프 구현을 인스턴스화 할 수 없습니다. [com.thinkaurelius.titan.core.TitanFactory]

Gremlin 서버 배포를 다운로드 한 다음 Titan을 수동 설치에 설명 된대로 설치했습니다. 나는 그렘린 서버를 가져

~/gremlin-server-3.0.0.M6$ cat conf/titan-cassandra.properties 

gremlin.graph=com.thinkaurelius.titan.core.TitanFactory 

storage.backend=cassandrathrift 
storage.directory=../db/cassandra 

~/gremlin-server-3.0.0.M6$ cat conf/gremlin-server.yaml 
host: localhost 
port: 8182 
threadPoolWorker: 1 
gremlinPool: 8 
scriptEvaluationTimeout: 30000 
serializedResponseTimeout: 30000 
channelizer: com.tinkerpop.gremlin.server.channel.WebSocketChannelizer 
graphs: { 
    g: conf/titan-cassandra.properties} 
    #g: conf/tinkergraph-empty.properties} 
plugins: 
    - aurelius.titan 

, 나는 다음과 같은 오류가 발생할 수 (심지어 놈아 서버 불구하고 그 자체가 온다) :

http://s3.thinkaurelius.com/docs/titan/0.9.0-M1/server.html

나는 모든 속성 설정 및 클래스 경로를 추가

bin/gremlin-server.sh 
[INFO] GremlinServer - 
     \,,,/ 
     (o o) 
-----oOOo-(3)-oOOo----- 

[INFO] GremlinServer - Configuring Gremlin Server from conf/gremlin-server.yaml 
[INFO] MetricManager - Configured Metrics ConsoleReporter configured with report interval=180000ms 
[INFO] MetricManager - Configured Metrics CsvReporter configured with report interval=180000ms to fileName=/tmp/gremlin-server-metrics.csv 
[INFO] MetricManager - Configured Metrics JmxReporter configured with domain= and agentId= 
[INFO] MetricManager - Configured Metrics Slf4jReporter configured with interval=180000ms and loggerName=com.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics 
[WARN] Graphs - Graph [g] configured at [conf/titan-cassandra.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: GraphFactory could not instantiate this Graph implementation [com.thinkaurelius.titan.core.TitanFactory] 
java.lang.RuntimeException: GraphFactory could not instantiate this Graph implementation [com.thinkaurelius.titan.core.TitanFactory] 
: 
: 
[INFO] GremlinServer - Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-* 
[INFO] ScriptEngines - Loaded nashorn ScriptEngine 
[INFO] ScriptEngines - Loaded gremlin-groovy ScriptEngine 
[INFO] GremlinServer - Initialized GremlinExecutor and configured ScriptEngines. 
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+kryo with com.tinkerpop.gremlin.driver.ser.KryoMessageSerializerV1d0 
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+kryo-stringd with com.tinkerpop.gremlin.driver.ser.KryoMessageSerializerV1d0 
[INFO] AbstractChannelizer - Configured application/vnd.gremlin-v1.0+json with com.tinkerpop.gremlin.driver.ser.JsonMessageSerializerGremlinV1d0 
[INFO] AbstractChannelizer - Configured application/json with com.tinkerpop.gremlin.driver.ser.JsonMessageSerializerV1d0 
[INFO] GremlinServer - Gremlin Server configured with worker thread pool of 1 and boss thread pool of 1 
[INFO] GremlinServer - Channel started at port 8182. 

또한 gremlin-shell을 통해 간단한 그래프 작업을 호출하려고하면 다음과 같이 표시됩니다.

bin/gremlin.sh 

     \,,,/ 
     (o o) 
-----oOOo-(3)-oOOo----- 
plugin activated: aurelius.titan 
plugin activated: tinkerpop.server 
plugin activated: tinkerpop.utilities 
SLF4J: Class path contains multiple SLF4J bindings. 
SLF4J: Found binding in [jar:file:/home/appsec/titan-1.0.0-hadoop1/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: Found binding in [jar:file:/home/appsec/titan-1.0.0-hadoop1/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] 
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. 
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 
20:50:02 INFO org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph - HADOOP_GREMLIN_LIBS is set to: /home/appsec/titan-1.0.0-hadoop1/lib 
plugin activated: tinkerpop.hadoop 
plugin activated: tinkerpop.tinkergraph 

gremlin> :remote connect tinkerpop.server conf/remote.yaml 
==>Connected - localhost/127.0.0.1:8182 

gremlin> GraphOfTheGodsFactory.load(graph) 
No such property: graph for class: groovysh_evaluate 
Display stack trace? [yN] y 
groovy.lang.MissingPropertyException: No such property: graph for class: groovysh_evaluate 


gremlin> graph = TitanFactory.open('/home/appsec/gremlin-server-3.0.0.M6/conf/titan-cassandra.properties') 
Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager 
Display stack trace? [yN] y 
java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager 
: 
: 
Caused by: java.net.ConnectException: Connection refused 
    at java.net.PlainSocketImpl.socketConnect(Native Method) 
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) 
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) 
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) 
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) 
    at java.net.Socket.connect(Socket.java:589) 
    at org.apache.thrift.transport.TSocket.open(TSocket.java:180) 
    ... 55 more 
+0

을, 나는 선택했다 이 링크 당 thinkaurelius가 아니라 tinkerpop에서 최대 타이탄,이 링크 http://stackoverflow.com/questions/32426336/load-titan-graph-with-gremlin – bhuvanrk

답변

0

Titan 1.0.0을 다운로드하여 사용해야하며 Titan 1.0.0 documentation for Titan Server을 참조하십시오. Gremlin Server는 Titan 1.0.0 배포판에 이미 번들되어 있으므로 별도로 설치할 필요가 없습니다.

Titan 1.0.0 릴리스에 버그가 있었고 fixed이었습니다. 이전에 StackOverflow question에 대해 자세히 알아볼 수 있습니다. 간단히 말해서 이라는 새로운 구성 파일을 가리 키도록 gremlin-server.yaml을 업데이트해야합니다. 당신이 타이탄에 그렘린 서버를 연결 (보다는 이미 타이탄 distrubtion에 포함 된 서버를 사용)에 관심이 있다면

, 나는이 mailing list post에서 몇 가지 단계 나열했습니다 : BTW

# Get Apache TinkerPop's Gremlin Server (Titan 1.0.0 uses TinkerPop 3.0.1) 
unzip apache-gremlin-server-3.0.1-incubating-bin.zip 
cd apache-gremlin-server-3.0.1-incubating 

# This will install Titan-Cassandra as a plugin under ext/titan-cassandra 
./bin/gremlin-server.sh -i com.thinkaurelius.titan titan-cassandra 1.0.0 

# Copy over some Titan configuration files 
# https://gist.github.com/pluradj/8437255e831d2b640b6fea4f815a79c5 
# * conf/titan-server.yaml 
# * conf/titan-cassandra.properties 

# start the server with Titan configuration 
./bin/gremlin-server.sh conf/titan-server.yaml