问题
I'm new to Titan and now I'm trying to connect to database.
There is a server and in this server there is a titan graph.
I found some documentation:
- https://github.com/tinkerpop/blueprints/wiki/Batch-Implementation
- How to import a CSV file into Titan graph database?
And I'm trying to use the following code:
TitanGraph titanGraph = TitanFactory.open("I don't know what to write here");
BatchGraph bg = new BatchGraph(titanGraph, VertexIDType.STRING, 1000);
In this code block I'm not sure how to configure the TitanFactory.open()
function. What should I put instead of the text "I don't know what to write here"
?
Or are there any examples for connecting to a remote titan graph using TitanFactory
? I've found some examples but they seem out of date (some class names and parameters are now different) so I'm unable to use them...
回答1:
The official Titan documentation for Titan 0.5.4 is located here. http://s3.thinkaurelius.com/docs/titan/0.5.4/
If you're new to Titan, you should start by going through it. Chapter 3 covers getting started with and features an example of how to use TitanFactory.open(). http://s3.thinkaurelius.com/docs/titan/0.5.4/getting-started.html#_loading_the_graph_of_the_gods_into_titan
The String parameter on TitanFactory.open() is the location of a properties file which configures the backend storage for the graph. There are several example properties files in the Titan download that you can try out.
来源:https://stackoverflow.com/questions/32502783/how-to-use-titanfactory-open