Actually, if you don't know the number of keys, then, you may need a
loop.
criteria = cf.createCriteria();
criteria.keyRange("", "", 100);
criteria.columnRange(ByteArray.EMPTY, ByteArray.EMPTY, 100);
Map<String, List<IColumn>> listMap = criteria.select();
in the above example, you will get the 100 keys with 100 columns.
First you need to ensure that all columns are returned. Actually, you
can give the columns a very big number, unless you are not sure
whether you server memory can hold all column data. So, in most of the
case, let's put Integer.MAX_VALUE.
Secondly, look back to the number of keys. The query above returns
only 100 keys. There will be a trick here. Once you got the first 100
keys, then, using the biggest key returned as the start key, and using
Empty string as finish key, and do a second query. But be sure that
there is a duplication in this case, since the start key columns will
be returned again in the next query.
While I'm writing, I found that select returns a map, which does not
have sequence, it is inconvenience to find the biggest key. The
original API should be easier because it returned the value
sequentially.
I will make an enhancement. :-) At the meantime, you may need to
iterate the returned keys and find the biggest keys.
Cheers,
Dop