Skip to content

Instantly share code, notes, and snippets.

@zcox
Created August 29, 2013 14:44
Show Gist options
  • Select an option

  • Save zcox/6379011 to your computer and use it in GitHub Desktop.

Select an option

Save zcox/6379011 to your computer and use it in GitHub Desktop.
titan-server-cassandra-es.properties shows how to set up Titan Server's ElasticSearch to accept remote connections (local-mode=false allows remote connections on port 9300). Main.scala shows how to configure TitanGraph to use the Titan Server's ElasticSearch.
val conf = new BaseConfiguration()
conf.setProperty("storage.backend","cassandra")
conf.setProperty("storage.hostname","127.0.0.1")
conf.setProperty("storage.index.search.backend", "elasticsearch")
conf.setProperty("storage.index.search.hostname", "127.0.0.1")
val graph = TitanFactory.open(conf)
storage.backend=embeddedcassandra
storage.cassandra-config-dir=config/cassandra.yaml
storage.index.search.backend=elasticsearch
storage.index.search.directory=/path/to/titan-data-dir/elasticsearch
storage.index.search.client-only=false
storage.index.search.local-mode=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment