pyaccumulo
pyaccumulo copied to clipboard
scan startInclusive appears to not work
I put a row with key 56b87a4949c4419288c62b84b865c2e8.
I .scan('tablename') and see that row in the results. I get nothing when I do this: .scan('tablename, scanrange=Range( srow='56b87a4949c4419288c62b84b865c2e8', erow='56b87a4949c4419288c62b84b865c2e8\0', sinclude=True))
It works when I do this: .scan('tablename, scanrange=Range( srow='56b87a4949c4419288c62b84b865c2e7', ## NOTE: decremented start key erow='56b87a4949c4419288c62b84b865c2e8\0', sinclude=True))
So it looks like 'start inclusive' scan doesn't actually work and Accumulo is always doing '>' but not '>='
There is a Java proxy bug in the scanner. If you create a BatchScanner, every range assigned to it has startInclusive=true, endInclusive=false.
https://git-wip-us.apache.org/repos/asf?p=accumulo.git;a=blob;f=proxy/src/main/java/org/apache/accumulo/proxy/ProxyServer.java;h=84990442ee50f207153dd74665ce0294c19a9b4d;hb=HEAD#l1055
There is what looks like an attempted workaround for this in the pyaccumulo Range constructor, but it's not helpful in other contexts where you can use Range, e.g. non-batch Scanner objects.
https://github.com/accumulo/pyaccumulo/blob/master/pyaccumulo/init.py#L102
I think the pyaccumulo workaround logic is correct, though.