Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cassandra/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Hector Cassandra连接错误_Cassandra_Hector - Fatal编程技术网

Hector Cassandra连接错误

Hector Cassandra连接错误,cassandra,hector,Cassandra,Hector,我正试图通过Hector支持的java客户端连接到本地cassandra实例。尝试连接后,我尝试读取行。代码片段如下所示 Cluster myCluster=HFactory.getOrCreateCluster(“test”,“localhost:9160”) KeyspaceDefinition keySpaceDef=myCluster.describeKeyspace(“testkeyspace”) 但是,由于此错误,连接失败 线程“main”java.lang.NoSuchField

我正试图通过Hector支持的java客户端连接到本地cassandra实例。尝试连接后,我尝试读取行。代码片段如下所示

Cluster myCluster=HFactory.getOrCreateCluster(“test”,“localhost:9160”)

KeyspaceDefinition keySpaceDef=myCluster.describeKeyspace(“testkeyspace”)

但是,由于此错误,连接失败

线程“main”java.lang.NoSuchFieldError中出现异常:默认值为\u MEMTABLE\u OPERATIONS\u(百万) atme.prettyprint.cassandra.service.ThriftCfDef.(ThriftCfDef.java:65) atme.prettyprint.cassandra.service.ThriftCfDef.fromThriftList(ThriftCfDef.java:144) atme.prettyprint.cassandra.service.ThriftKsDef.(ThriftKsDef.java:34) at me.prettyprint.cassandra.service.AbstractCluster$4.execute(AbstractCluster.java:192) at me.prettyprint.cassandra.service.AbstractCluster$4.execute(AbstractCluster.java:187) at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:101) at me.prettyprint.cassandra.connection.HConnectionManager.OperationWithFailover(HConnectionManager.java:232) at me.prettyprint.cassandra.service.AbstractCluster.describeKeyspace(AbstractCluster.java:201)


我的pom.xml中有cassandra,节俭作为依赖项。有什么线索可以说明问题吗?

您使用的是什么版本的C*和Hector?我将此标记为已解决。问题是我的apache thrift版本有冲突