Re: get the latest column fails in cassandra 7

2010-07-23 Thread Jonathan Ellis
maybe you're confusing timestamp order with column name order?

hard to say without a complete example including the inserts.

On Tue, Jul 20, 2010 at 10:10 PM, Bujji4Tech sivait...@gmail.com wrote:
 hi all ,
 I am trying Cassandra 7(using latest build) got problem in getting the
 latest column in  a row.

 and my code is here
                  SlicePredicate predicate = new SlicePredicate();
 predicate.slice_range = new SliceRange(new byte[0], new byte[0], true,1);
 ColumnParent column_parent = new ColumnParent(myColumnFamily);
 ListColumnOrSuperColumn listCoList = javaClient.client.get_slice(key1
 .getBytes(), column_parent, predicate, ConsistencyLevel.ONE);
 String colName = null;
 for (ColumnOrSuperColumn csc : listCoList) {
 colName= new String(csc.column.getName());
 }

     here colName is not coming as the latest one.
     the one which is before latest is coming always as the latest one
     any solution  ?
     help me
 Thanks,
 Bujji











-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of Riptano, the source for professional Cassandra support
http://riptano.com


get the latest column fails in cassandra 7

2010-07-20 Thread Bujji4Tech
hi all ,

I am trying Cassandra 7(using latest build) got problem in getting the
latest column in  a row.


and my code is here

 SlicePredicate predicate = new SlicePredicate();
 predicate.slice_range = new SliceRange(new byte[0], new byte[0], true,1);
 ColumnParent column_parent = new ColumnParent(myColumnFamily);
 ListColumnOrSuperColumn listCoList = javaClient.client.get_slice(key1
.getBytes(), column_parent, predicate, ConsistencyLevel.ONE);
 String colName = null;
 for (ColumnOrSuperColumn csc : listCoList) {

colName= new String(csc.column.getName());
}


here colName is not coming as the latest one.
the one which is before latest is coming always as the latest one

any solution  ?
help me

Thanks,
Bujji