简体   繁体   English

泰坦无法连接到卡桑德拉

[英]Titan unable to connect to Cassandra

在此处输入图片说明

I'm trying to code to connect Tital to this Cassandra with this code: 我正在尝试使用以下代码编写代码以将Tital连接到此Cassandra:

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

However, I am getting this error : 但是,我收到此错误

Exception in thread "main" java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55) at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473) at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:407) at 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) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeCon 线程“主”中的异常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方法) structorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44) ... 7 more Caused by: com.thinkaurelius.titan.diskstorage.TemporaryBackendException: Temporary failure in storage backend at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.ensureKeyspaceExists(AstyanaxStoreManager.java:572) at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.(AstyanaxStoreManager.java:291) ... 12 more Caused by: com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: PoolTimeoutException: [host=127.0.0.1(127.0.0.1):9160, latency=10003(10003), attempts=1]Timed out waiting for connection at com.netflix.astyanax.connectionpool.impl.SimpleHostConnectionPool.waitForConnecti 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上等待连接超时 on(SimpleHostConnectionPool.java:231) at com.netflix.astyanax.connectionpool.impl.SimpleHostConnectionPool.borrowConnection(SimpleHostConnectionPool.java:198) at com.netflix.astyanax.connectionpool.impl.RoundRobinExecuteWithFailover.borrowConnection(RoundRobinExecuteWithFailover.java:84) at com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl.tryOperation(AbstractExecuteWithFailoverImpl.java:117) at com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(AbstractHostPartitionConnectionPool.java:352) at com.netflix.astyanax.thrift.ThriftClusterImpl.executeSchemaChangeOperation(ThriftClusterImpl.java:146) at com.netflix.astyanax.thrift.ThriftClusterImpl.internalCreateKeyspace(ThriftClusterImpl.java:321) at com.netflix.astyanax.thrift.ThriftClusterImpl.addKeyspace(ThriftClusterImpl.java:294) at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.ensureKeyspaceExists(AstyanaxStoreManager.java:567) ... 13 m 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 ore 矿石

Enable Thrift server of Cassandra 启用Cassandra的Thrift服务器

Use the below command to enable thrift 使用以下命令启用节俭

nodetool enablethrift

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

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