You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Courtney Robinson <sa...@live.co.uk> on 2010/09/14 11:44:50 UTC

column limit on multiget_slice or get_slice

Is it possible to get the first x columns from a row without knowing the 
column names?
So far i've been working with just grabbing all the columns in a row or just 
getting a specific column that i know the name of.
If it is possible, can anyone point me in the right direction of how to do 
this?
I'm using 0.6.4 with the thrift interface in java, i use hector but i'd much 
prefer knowing how its done via thrift first :)
thanks 


Re: column limit on multiget_slice or get_slice

Posted by Courtney Robinson <sa...@live.co.uk>.
Ahhh, excellent.
thank you


From: Chen Xinli 
Sent: Tuesday, September 14, 2010 10:51 AM
To: user@cassandra.apache.org 
Subject: Re: column limit on multiget_slice or get_slice


you can use get_slice: 
public List<ColumnOrSuperColumn> get_slice(String keyspace, String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level) throws InvalidRequestException, UnavailableException, TimedOutException, TException;

In the SlicePredicate.SliceRange, set start and finish to empty, count to x


2010/9/14 Courtney Robinson <sa...@live.co.uk>

  Is it possible to get the first x columns from a row without knowing the column names?
  So far i've been working with just grabbing all the columns in a row or just getting a specific column that i know the name of.
  If it is possible, can anyone point me in the right direction of how to do this?
  I'm using 0.6.4 with the thrift interface in java, i use hector but i'd much prefer knowing how its done via thrift first :)
  thanks 




-- 
Best Regards,
Chen Xinli

Re: column limit on multiget_slice or get_slice

Posted by Chen Xinli <ch...@gmail.com>.
you can use get_slice:
public List<ColumnOrSuperColumn> get_slice(String keyspace, String key,
ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel
consistency_level) throws InvalidRequestException, UnavailableException,
TimedOutException, TException;

In the SlicePredicate.SliceRange, set start and finish to empty, count to x

2010/9/14 Courtney Robinson <sa...@live.co.uk>

> Is it possible to get the first x columns from a row without knowing the
> column names?
> So far i've been working with just grabbing all the columns in a row or
> just getting a specific column that i know the name of.
> If it is possible, can anyone point me in the right direction of how to do
> this?
> I'm using 0.6.4 with the thrift interface in java, i use hector but i'd
> much prefer knowing how its done via thrift first :)
> thanks
>



-- 
Best Regards,
Chen Xinli