i'm trying to do queries in my cassandra db. I want to retrieve data in a single Column which is in a superColumn, which is in a superColumn ... a bit complicated but i need it for modelise my db.
I used the documentation of Hector : http://www.datastax.com/sites/default/files/hector-v2-client-doc.pdf
but, when i try to read the single column, this doc purpose to use this method :
<code>ColumnQuery<String, String, String> columnQuery =
HFactory.createStringColumnQuery(keyspace);
columnQuery.setColumnFamily("Standard1").setKey("jsmith").setName("first");
Result<HColumn<String, String>> result = columnQuery.execute(); </code>
but, what is "Result" ? I search on google , I found that the result is an object Result, but I've all libraries and no one know this object.
I replace Result by QueryResult, but, when I launch my class main, I got this error :
me.prettyprint.hector.api.exceptions.HInvalidRequestException: InvalidRequestException(why:supercolumn parameter is not optional for super CF Super2) at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate(ExceptionsTranslatorImpl.java:45) at me.prettyprint.cassandra.service.KeyspaceServiceImpl$23.execute(KeyspaceServiceImpl.java:851) at me.prettyprint.cassandra.service.KeyspaceServiceImpl$23.execute(KeyspaceServiceImpl.java:1) at me.prettyprint.cassandra.service.Operation.executeAndSetResult(Operation.java:103) at me.prettyprint.cassandra.connection.HConnectionManager.operateWithFailover(HConnectionManager.java:258) at me.prettyprint.cassandra.service.KeyspaceServiceImpl.operateWithFailover(KeyspaceServiceImpl.java:131) at me.prettyprint.cassandra.service.KeyspaceServiceImpl.getColumn(KeyspaceServiceImpl.java:857) at me.prettyprint.cassandra.model.thrift.ThriftColumnQuery$1.doInKeyspace(ThriftColumnQuery.java:57) at me.prettyprint.cassandra.model.thrift.ThriftColumnQuery$1.doInKeyspace(ThriftColumnQuery.java:1) at me.prettyprint.cassandra.model.KeyspaceOperationCallback.doInKeyspaceAndMeasure(KeyspaceOperationCallback.java:20) at me.prettyprint.cassandra.model.ExecutingKeyspace.doExecute(ExecutingKeyspace.java:85) at me.prettyprint.cassandra.model.thrift.ThriftColumnQuery.execute(ThriftColumnQuery.java:52) at com.riptano.cassandra.hector.example.InsertSuperColumn.main(InsertSuperColumn.java:74) Caused by: InvalidRequestException(why:supercolumn parameter is not optional for super CF Super2) at org.apache.cassandra.thrift.Cassandra$get_result.read(Cassandra.java:5930) at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) at org.apache.cassandra.thrift.Cassandra$Client.recv_get(Cassandra.java:505) at org.apache.cassandra.thrift.Cassandra$Client.get(Cassandra.java:490) at me.prettyprint.cassandra.service.KeyspaceServiceImpl$23.execute(KeyspaceServiceImpl.java:846) ... 11 more
when I focus to the line which cause this error its the line :
**QueryResult<HColumn<String, String>> result5 = result3.execute();**
where I replace Result by QueryResult.
How can i resolve it please ?