accumulo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Thrift proxy: Python WholeRowIterator behavior
Date Sat, 12 Apr 2014 18:49:36 GMT
Hi David,

Looks like you're just mis-using the Range here.

If you create a range that is ["row0", "row0"] as you denote below, that 
will only include Keys that have a rowId of "row0" with an empty colfam, 
colqual, etc. Since you want to use the WholeRowIterator, I can assume 
you want all columns in "row0". As such, ["row0", "row0\0") would be the 
best range to fetch all of the columns in that single row.

On 4/12/2014 1:59 PM, David O'Gwynn wrote:
> Hi all,
>
> I'm working with the Python Thrift API for the Accumulo proxy service,
> and I have a bit of odd behavior happening. I'm using Accumulo 1.5
> (the standard one from the Accumulo website).
>
> Whenever I use the WholeRowIterator with a Scanner, I cannot configure
> the Range for that Scanner to correctly return the start row for the
> Range. E.g. for the Range('row0',true,'row0',true) [to pull a singe
> row], it returns zero entries. For Range('row0',true,'row1\0',true),
> it returns only "row1".
>
>  From the WholeRowIterator documentation, this behavior implies that
> the startInclusive bit was set to False, which it clearly wasn't.
>
> I've been able to hack around this issue by setting the start key to
>
> Key(row=(row[:-1]+chr(ord(row[-1])-1))+'\0', inclusive=False)
>
> but I'd really rather understand the correct way of using a Range
> object in conjunction with a WholeRowIterator.
>
> Thanks much,
>
> David
>

Mime
View raw message