2017-07-17 71 views
0

enter image description here泰坦無法連接到卡桑德拉

我試圖代碼Tital與此代碼連接到該卡珊德拉:

TitanGraph graph = TitanFactory.build() 
      .set("storage.backend","cassandra") 
      .set("storage.hostname","127.0.0.1") 
      .open(); 

不過,我得到這個錯誤

線程「main」中的異常java.lang.IllegalArgumentException:可能 未實例化實現: c om.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager 在 com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55) 在 com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass (Backend.java:473) 在 com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:407) 在 com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration。(GraphDatabaseConfiguration.java:1320) at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84) at com.thinkaurelius.titan.core.TitanFactory $ Builder.open(TitanFactory.java:139) at com.txtstreet.bucket.TitanExample.main(TitanExample.java:59) 引起:java.lang.reflect .InvocationTargetException在 sun.reflect.NativeConstructorAccessorImpl.newInstance0(本機方法) 在 sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 在 sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 在java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(Configurat com.thinkaurelius.titan.diskstorage.TemporaryBackendException:ionUtil.java:44) ... 7更所致 在存儲後端臨時故障在 com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.ensureKeyspaceExists( 。 com.netflix.astyanax.connectionpool.exceptions:AstyanaxStoreManager.java:572) 在 com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager(AstyanaxStoreManager.java:291) ...... 12多所致。 PoolTimeoutException: PoolTimeoutException:[host = 127.0.0.1(127.0.0.1):9160, latency = 10003(10003),attempts = 1]超時等待連接 com.netflix.astyanax.connectionpool.impl.Simple HostConnectionPool.waitForConnection(SimpleHostConnectionPool.java:231) 在 com.netflix.astyanax.connectionpool.impl.SimpleHostConnectionPool.borrowConnection(SimpleHostConnectionPool.java:198) 在 com.netflix.astyanax.connectionpool.impl.RoundRobinExecuteWithFailover.borrowConnection( RoundRobinExecuteWithFailover.java:84) 在 com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl.tryOperation(AbstractExecuteWithFailoverImpl.java:117) 在 com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(AbstractHostPartitionConnectionPool.java: 352) at com.netflix.astyanax.thrift.ThriftClusterImpl。executeSchemaChangeOperation(ThriftClusterImpl.java:146) 在 com.netflix.astyanax.thrift.ThriftClusterImpl.internalCreateKeyspace(ThriftClusterImpl.java:321) 在 com.netflix.astyanax.thrift.ThriftClusterImpl.addKeyspace(ThriftClusterImpl.java:294) 在 com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.ensureKeyspaceExists(AstyanaxStoreManager.java:567) ...... 13多個

回答

0

啓用卡桑德拉之儉服務器

使用以下命令啓用節儉

nodetool enablethrift