[英]Titan unable to connect to Cassandra
我正在嘗試使用以下代碼編寫代碼以將Tital連接到此Cassandra:
TitanGraph graph = TitanFactory.build()
.set("storage.backend","cassandra")
.set("storage.hostname","127.0.0.1")
.open();
但是,我收到此錯誤 :
線程“主”中的異常java.lang.IllegalArgumentException:無法實例化實現:com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55上的com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager )在com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473)在com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:407)在com.thinkaurelius.titan.graphdb.configuration。 com處com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)處的GraphDatabaseConfiguration。(GraphDatabaseConfiguration.java:1320)com處com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)處的com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) thinkaurelius.titan.core.TitanFactory $ Builder.open(TitanFactory.java:139)位於com.txtstreet.bucket.TitanExample.main(TitanExample.java:59)由以下原因引起:java.lang.reflect.InvocationTargetException at sun.reflect。 sun.reflect.NativeCon上的NativeConstructorAccessorImpl.newInstance0(Native方法) com.thinkaurelius.titan上java.lang.reflect.Constructor.newInstance(Constructor.java:423)上的sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)上的structorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)。 .system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)... 7更多原因:com.thinkaurelius.titan.diskstorage.TemporaryBackendException:com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager的存儲后端出現臨時故障.ensureKeyspaceExists(AstyanaxStoreManager.java:572)位於com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager。(AstyanaxStoreManager.java:291)...另外12個原因:com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException :PoolTimeoutException:[主機= 127.0.0.1(127.0.0.1):9160,延遲= 10003(10003),嘗試= 1]在com.netflix.astyanax.connectionpool.impl.SimpleHostConnectionPool.waitForConnecti上等待連接超時 com.netflix.astyanax.connectionpool.impl.com上的(SimpleHostConnectionPool.java:231).com.netflix.astyanax.connectionpool.impl.RoundRobinExecuteWithFailover.borrowConnection(RoundRobinExecuteWithFailover.SimpleHostConnectionPool.java:198) com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl.tryOperation(AbstractExecuteWithFailoverImpl.java:117)com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(AbstractHostPartitionConnectionPool.java:352) .com.netflix.astyanax.thrift.ThriftClusterImpl.executeSchemaChangeOperation(ThriftClusterImpl.java:146)at com.netflix.astyanax.thrift.ThriftClusterImpl.internalCreateKeyspace(ThriftClusterImpl.java:321)at com.netflix.astyanax.thrift.ThriftClusterI com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.ensureKeyspaceExists(AstyanaxStoreManager.java:567)... 13 m 礦石
啟用Cassandra的Thrift服務器
使用以下命令啟用節儉
nodetool enablethrift
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.