Hi all,

when iterating CFs with getSequentialIterator you have to specify him a range. But what do you do when you need to:

A- Scan the full range?
B- Scan from key X to the end?

Scanning between keys X,Y is easy as you just specify them in the range. Scanning up to Y can be done with ByteBufferUtil.EMPTY_BYTE_BUFFER as the left limit.

The problem is how to tell him the righ limit is 'open'. An assert will prevent it.

I was wondering what is the right way to do that. I am stuck with that and I am sure it will be the easiest thing but I can't get round it... This is how I am building the range:

Range<RowPosition> myRange =
                                new Range<RowPosition>(
RowPosition.forKey(ByteBufferUtil.EMPTY_BYTE_BUFFER, index.getIndexCfs().partitioner), RowPosition.forKey(ByteBufferUtil.bytes(1975L), index.getIndexCfs().partitioner),
index.getIndexCfs().partitioner);

Thanks in advance.

Reply via email to