lookup ColumnSliceIterator in hector.  this does what you want a lot easier 
than managing the "paging"

From: Yuhan Zhang <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Date: Tue, 14 Feb 2012 14:46:08 -0800
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: timed-out retrieving a giant row.

Thanks Robin! :)

On Tue, Feb 14, 2012 at 12:23 PM, R. Verlangen 
<[email protected]<mailto:[email protected]>> wrote:
Of course you should set your limit to 100 or something like that, not  
Integer.MAX_VALUE ;-)

2012/2/14 R. Verlangen <[email protected]<mailto:[email protected]>>

I'm familiar to this in PHPCassa, but with Hector it would be something like 
this:

Query you CF with a range.setStart(lastColName) and 
range.setFinish(StringUtils.byte("") where the " lastColName " is the name of 
the column from the previous read.

You can continue this until you run out of results.


2012/2/14 Yuhan Zhang <[email protected]<mailto:[email protected]>>
Hi all,

I'm using the Hector client 0.8, trying to retrieve a list of IDs from a gaint 
row. each ID is a columnName in the row
It works ok when there's not many IDs, but SliceQuery starts to time-out after 
the row becomes big.

Is this approach the correct way to store a list of IDs? are there some 
settings that I'm missing?
by looking at the code, it sets the range of the columnNames to be 
setRange(null, null, false, Integer.MAX_VALUE);

is there a way in cassandra to retrieve the first 100 columns, then the next 
100 columns, and so forth?


Thank you.

Yuhan



Reply via email to