You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Renato Marroquín Mogrovejo <re...@gmail.com> on 2013/01/14 18:18:34 UTC

Retrieving all columns from a result

Hi all,

I am trying to get all columns from a certain number of records I am
fetching. I am using the RangeSlicesQuery to achieve this, but it
forces me to set how many columns I want to be retrieved.


RangeSlicesQuery<UUID, String, String> rangeSlicesQuery = HFactory
                .createRangeSlicesQuery(keyspace, uuidSerializer,
stringSerializer, stringSerializer)
                .setColumnFamily("columnFamily1")
                .setRowCount(pCount)
                .setRange(null, null, false, 100);

I was wondering if there is something like an example on how to use
ColumnSliceIterator on this type of query.
Thanks in advance!


Renato M.

Re: Retrieving all columns from a result

Posted by Renato Marroquín Mogrovejo <re...@gmail.com>.
Thanks Vivek that worked!
But I can't use a ColumnSliceIterator with this type of query?


Renato M.

2013/1/14 Vivek Mishra <mi...@gmail.com>:
>
> RangeSlicesQuery<UUID, String, String> rangeSlicesQuery = HFactory
>                 .createRangeSlicesQuery(
>>
>> keyspace, uuidSerializer,
>> stringSerializer, stringSerializer)
>>                 .setColumnFamily("columnFamily1")
>>                 .setRowCount(pCount)
>>                 .setRange("", "", true, Integer.MAX_VALUE);
>
>
> Try this, if it works for you.
>
> -Vivek
>
>
>
> On Mon, Jan 14, 2013 at 10:48 PM, Renato Marroquín Mogrovejo
> <re...@gmail.com> wrote:
>>
>> Hi all,
>>
>> I am trying to get all columns from a certain number of records I am
>> fetching. I am using the RangeSlicesQuery to achieve this, but it
>> forces me to set how many columns I want to be retrieved.
>>
>>
>> RangeSlicesQuery<UUID, String, String> rangeSlicesQuery = HFactory
>>                 .createRangeSlicesQuery(keyspace, uuidSerializer,
>> stringSerializer, stringSerializer)
>>                 .setColumnFamily("columnFamily1")
>>                 .setRowCount(pCount)
>>                 .setRange(null, null, false, 100);
>>
>> I was wondering if there is something like an example on how to use
>> ColumnSliceIterator on this type of query.
>> Thanks in advance!
>>
>>
>> Renato M.
>
>

Re: Retrieving all columns from a result

Posted by Vivek Mishra <mi...@gmail.com>.
RangeSlicesQuery<UUID, String, String> rangeSlicesQuery = HFactory
                .createRangeSlicesQuery(
>
> keyspace, uuidSerializer,
> stringSerializer, stringSerializer)
>                 .setColumnFamily("columnFamily1")
>                 .setRowCount(pCount)
>                 .setRange("", "", true, Integer.MAX_VALUE);


Try this, if it works for you.

-Vivek



On Mon, Jan 14, 2013 at 10:48 PM, Renato Marroquín Mogrovejo <
renatoj.marroquin@gmail.com> wrote:

> Hi all,
>
> I am trying to get all columns from a certain number of records I am
> fetching. I am using the RangeSlicesQuery to achieve this, but it
> forces me to set how many columns I want to be retrieved.
>
>
> RangeSlicesQuery<UUID, String, String> rangeSlicesQuery = HFactory
>                 .createRangeSlicesQuery(keyspace, uuidSerializer,
> stringSerializer, stringSerializer)
>                 .setColumnFamily("columnFamily1")
>                 .setRowCount(pCount)
>                 .setRange(null, null, false, 100);
>
> I was wondering if there is something like an example on how to use
> ColumnSliceIterator on this type of query.
> Thanks in advance!
>
>
> Renato M.
>