2
votes

what is titan-cassandra-es.properties file in titan ?

I ran the GraphOfTheGodsFactory(version 0.5.4) create method to path 'tmp/titan' , but titan-cassandra-es.properties file was not generated.

How can i access the graph created in path tmp/titan for visualizing it. i tried the code

private static final String DB_PATH = "conf/titan-config.properties";          
TitanGraph g = TitanFactory.open(DB_PATH); 

Then , i invoked this java in index.jsp to display the nodes using cytoscape. But , i end up with error message

Exception raised in jsp : Backend shorthand unknown: conf/titan-config.properties

What does this imply ?

1

1 Answers

5
votes

what is titan-cassandra-es.properties file in titan ?

That's the configuration file that tells Titan about the kind of Titan instance you want. For that specific file, it contains configuration settings to start Titan against a running local instance of Cassandra and a running instance of ElasticSearch.

but titan-cassandra-es.properties file was not generated

Not sure why you would expect that file to be "generated". It is a .properties file for configuration as I mentioned above. You write the .properties file (or use an existing one) to tell Titan how you want it set up.

How can i access the graph created in path tmp/titan for visualizing it

There won't be a graph at tmp/titan. That's not how you create/open a graph. Again, you must supply the open method a valid path to a configuration .properties file.

It looks like you care about using Cassandra and Elasticsearch. As mentioned earlier, you must have both instances installed and running on your system locally for that default configuration to work. If you read the titan-cassandra-es.properties file, you can see how to save yourself install of ES and have it run in the same JVM as titan. Specifically, comment out:

index.search.hostname=127.0.0.1
index.search.elasticsearch.client-only=true

and uncomment:

#index.search.directory=../db/es
#index.search.elasticsearch.client-only=false
#index.search.elasticsearch.local-mode=true

A separate instance of ES would be recommended for production, but since you just want to play with Graph of the Gods, this approach is probably acceptable.