Connect Gremlin shell to Titan Elasticsearch/Cassandra embedded instance?

Deadly 提交于 2020-01-05 04:16:23

问题


I'm using Titan 0.3.2 in embedded mode with Cassandra and Elasticsearch. I am using the configuration documented in the titan docs for my cassandra-es.properties (fed into titan.sh/titan.bat):

storage.backend=embeddedcassandra
storage.cassandra-config-dir=config/cassandra.yaml

storage.index.search.backend=elasticsearch
storage.index.search.directory=/tmp/searchindex
storage.index.search.client-only=false
storage.index.search.local-mode=true

But I'm trying to get the right configuration for bin/cassandra-es.local to connect to the Titan server via the Gremlin client shell (with g = TitanFactory.open("cassandra-es.local") ). If I try to use the default version included with the download:

storage.backend=cassandrathrift
storage.hostname=127.0.0.1

The graph won't know anything about the ES index ("Index is unknown or not configured: search").

If I configure it with:

storage.backend=cassandrathrift
storage.hostname=127.0.0.1

storage.index.search.backend=elasticsearch
storage.index.search.client-only=false
storage.index.search.directory=/tmp/cassandra/elasticsearch

It will create an ES instance on another port that seems to exist separately from the one used by the server.

My question: (how) can I set up my Gremlin console to properly communicate with the Titan Embedded Server?


回答1:


There was some recent discussion about this on the Google group. It looks like it's actually not possible to run two ES instances on one machine, so one of the easier ways around this is to set up ES separately on a VM.

I tried out this solution, and it works fine with these lines in both cassandra-es.local and titan-server-cassandra-es.properties:

storage.index.search.backend=elasticsearch
storage.index.search.hostname=<VM ES server IP>
storage.index.search.client-only=true

I can now access the same ES index from both the Gremlin shell and the Titan server.



来源:https://stackoverflow.com/questions/19014226/connect-gremlin-shell-to-titan-elasticsearch-cassandra-embedded-instance

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!