Any suggestions on efficient endless loop over all keys and all columns using pycassa?

73 Views Asked by At

If I issue:

colfam.get_range()

I get an iterator over all rows and columns as OrderedDict as

for rowkey, coldict in colfam.get_range()

However, if I just want the keys

for retval in colfam.get_range(column_count = 0)
    print retval[0]
    continue

I don't see anything printed. Following does work, however:

for retval in colfam.get_range(start = 'x', end = 'x', column_count = 0)
    print retval[0]
    continue

(prints x correctly).

I read elsewhere that get_range with column_count = 0 is supposed to produce a generator over keys only, am I wrong?

The problem I am facing is that some of the keys have large number of columns which cause the pycassa to timeout. I was hoping to get a generator over keys, and then for every key, a xget over all rows.

Thanks for reading!

0

There are 0 best solutions below