I am newbie in cassandra,and my data storage structure is
list test
RowKey: key1
=> (column=colkey1:colkey2, value=amitdubey, timestamp=1381832571947000)
=> (column=colkey1:colkey3, value=amitdubey, timestamp=1381832571947000)
=> (column=colkey1:colkey4, value=amitdubey, timestamp=1381832571947000)
-------------------
RowKey: key2
=> (column=colkey1:colkey2, value=amitdubey, timestamp=1381832571947000)
=> (column=colkey1:colkey3, value=amitdubey, timestamp=1381832571947000)
=> (column=colkey1:colkey4, value=amitdubey, timestamp=1381832571947000)
-------------------
using column definition is
create column family test
with column_type = 'Standard'
and comparator=
'CompositeType(org.apache.cassandra.db.marshal.UTF8Type,
org.apache.cassandra.db.marshal.UTF8Type)'
and default_validation_class = 'UTF8Type'
and key_validation_class = 'UTF8Type';
but when I fetch keyRow :
SliceQuery<String,Composite,String> sliceQuery=HFactory.createSliceQuery(keyspace, se, ce, se);
sliceQuery.setColumnFamily("test");
sliceQuery.setKey("jax");
sliceQuery.setRange(null,null, false, Integer.MAX_VALUE);
QueryResult<ColumnSlice<Composite,String>>result=sliceQuery.execute();
System.out.println(orderedRows.getColumns());
output is:
[HColumn([java.nio.HeapByteBuffer[pos=0 lim=1 cap=1], java.nio.HeapByteBuffer[pos=0 lim=1 cap=1]]=5), HColumn([java.nio.HeapByteBuffer[pos=0 lim=1 cap=1], java.nio.HeapByteBuffer[pos=0 lim=1 cap=1]]=5), HColumn([java.nio.HeapByteBuffer[pos=0 lim=1 cap=1], java.nio.HeapByteBuffer[pos=0 lim=1 cap=1]]=5), HColumn([java.nio.HeapByteBuffer[pos=0 lim=1 cap=1], java.nio.HeapByteBuffer[pos=0 lim=1 cap=1]]=5), HColumn([java.nio.HeapByteBuffer[pos=0 lim=1 cap=1], java.nio.HeapByteBuffer[pos=0 lim=1 cap=1]]=5)]