My previous question是關於TitanFactory類的語法。現在我想知道如何使用它?TitanFactory.open()configration
例如,我可以像下面那樣構建RexsterGraph對象,它的作用就像一個魅力。
Graph graph = new RexsterGraph(http://190.188.20.11:8183/graphs/graph");
現在我想導入csv文件到泰坦。所以我需要TitanGraph對象。我發現以下帖子來做到這一點。
How to import a CSV file into Titan graph database?
而且我又寫道下面的代碼,這讓我的錯誤。
找不到實現類: com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager
TitanGraph titanGraph = null;
try {
titanGraph = TitanFactory
.open("D:\\TEMP\\titan-cassandra.properties");
} catch (Exception e) {
System.err.println(e.getMessage());
System.out.println("\n");
System.err.println(e.getStackTrace());
}
我唯一需要的是,我要像RexsterGraph例如,對於一些代碼獲取TitanGraph對象的實例。我該怎麼辦?順便說一下我對我的本地運行的代碼,但圖中正在遠程Linux機器
你會編輯你的問題,並描述你的Titan設置多一點?看起來你想用一個遠程Cassandra集羣作爲Titan的存儲後端?如果您的應用程序可以訪問遠程Cassandra集羣,則不一定需要Rexster將圖形數據加載到Titan中。對於圖實例,rexster config xml的外觀如何? –