Hector Cassandra Connectivity Error

107 Views Asked by At

I am trying to connect to a local cassandra instance through a java client powered by Hector. I attempt to read rows after trying to connect. The code snippet is as follows

Cluster myCluster = HFactory.getOrCreateCluster("test" , "localhost:9160");

KeyspaceDefinition keySpaceDef = myCluster.describeKeyspace("testkeyspace");

.....

However the connectivity fails with this error

Exception in thread "main" java.lang.NoSuchFieldError: DEFAULT_MEMTABLE_OPERATIONS_IN_MILLIONS at me.prettyprint.cassandra.service.ThriftCfDef.(ThriftCfDef.java:65) at me.prettyprint.cassandra.service.ThriftCfDef.fromThriftList(ThriftCfDef.java:144) at me.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.operateWithFailover(HConnectionManager.java:232) at me.prettyprint.cassandra.service.AbstractCluster.describeKeyspace(AbstractCluster.java:201)

I have cassandra, thrift as dependencies in my pom.xml. Any clues as to what could be wrong?

0

There are 0 best solutions below