简体   繁体   English

Cassandra和Titan Graph连接失败

[英]Cassandra and Titan Graph connection failed

I am using datastax community server 1.2.13 and Titan 0.4.2 . 我使用的是datastax社区服务器1.2.13Titan 0.4.2 If I use following command 如果我使用以下命令

gremlin> g = TitanFactory.open('conf/titan-cassandra-es.properties')
==>titangraph[cassandrathrift:127.0.0.1]

Its not showing any error but when I use following in my java code: 它没有显示任何错误,但当我在我的java代码中使用以下时:

Configuration conf = new BaseConfiguration();
conf.setProperty("storage.backend","cassandra");
conf.setProperty("storage.hostname","127.0.0.1");
conf.setProperty("storage.port","9160");
TitanGraph g = TitanFactory.open(conf);

It show following exception: 它显示以下异常:

Exception in thread "main" java.lang.IllegalArgumentException: Could not find implementation class: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
    at com.thinkaurelius.titan.diskstorage.Backend.instantiate(Backend.java:347)
    at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:367)
    at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:311)
    at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:121)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1163)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:75)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:40)
    at newpackage.TitanTest.main(TitanTest.java:24)

If i use conf.setProperty("storage.backend","cassandrathrift"); 如果我使用conf.setProperty("storage.backend","cassandrathrift");

It show : 它显示:

Exception in thread "main" java.lang.IllegalArgumentException: Could not find implementation class: com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager
    at com.thinkaurelius.titan.diskstorage.Backend.instantiate(Backend.java:347)
    at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:367)
    at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:311)
    at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:121)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1163)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:75)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:40)
    at newpackage.TitanTest.main(TitanTest.java:24)

Why? 为什么?

The error makes me think you haven't downloaded the correct packaging of Titan. 这个错误让我觉得你没有下载Titan的正确包装。 If you didn't download this one titan-all-0.4.2.zip perhaps you should try that. 如果你没有下载这个titan-all-0.4.2.zip,也许你应该尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM