Reputation: 73
I started two gremlin server in two different machines ,for distribute computing.
Here is part of gremlin-server.yaml
host: 192.168.200.115
port: 8182
threadPoolWorker: 3
gremlinPool: 6
scriptEvaluationTimeout: 30000
serializedResponseTimeout: 30000
channelizer: org.apache.tinkerpop.gremlin.server.channel.WebSocketChannelizer
graphs: {graph: conf/titan-cassandra-es.properties}
....
Here is part of titan-cassandra-es.properties
storage.backend=cassandrathrift
gremlin.graph=com.thinkaurelius.titan.core.TitanFactory
storage.hostname=192.168.200.115,192.168.200.116
storage.cassandra.keyspace=titan
storage.cassandra.replication-factor=3
....
It's all right when I started the gremlin server ,and connected to the gremlin server cluster:
gremlin> :remote connect tinkerpop.server conf/remote.yaml
==>Connected - dns121/192.168.200.116:8182, dns115/192.168.200.115:8182
But when I want to get the graph instance ,It's warning 'No such property: graph for class: groovysh_evaluate'.
gremlin> graph
No such property: graph for class: groovysh_evaluate
Display stack trace? [yN] n
But in this page, it shows we can use graph directly after we connected to a gremlin server cluster.
So question is ,Which part I'm missing ?
Upvotes: 2
Views: 238
Reputation: 46226
Your syntax is bad. You are evaluating "graph" locally in the console and not on the server. You need to include :submit
with your command or as shown in the documentation you referenced :>
(the shortcut for :sumbit
).
gremlin> :> graph
That should fix your problem. Note that in later versions of TinkerPop you can put the "remote" into console mode with:
gremlin> :remote console
which allows you to omit the :>
. You can read more about that here. That feature is not available on Titan 1.0 but thought I would mention it.
Upvotes: 4