hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Gray <jl...@streamy.com>
Subject Re: real prefix filter
Date Thu, 20 Aug 2009 15:34:12 GMT
It should, perhaps, stop once you pass the prefix.  I actually thought 
it did, but you and the code say otherwise.  Doing the early-out with a 
Get is actually not possible, so this may be why it is not implemented 
as such.

However, a Scan can take both a startRow and a stopRow.  So you can use 
that to early-out instead.

Given that filters now work with Gets, you cannot actually implement the 
early-out within the filter.  You'll have to use start/stop rows.  One 
could argue a prefix filter may not make much sense on a Get (since you 
must explicitly specify row), so if you'd like to raise that issue and 
see if we could integrate an early-out in the filter, please file a JIRA.


Matus Zamborsky wrote:
> Hello,
> I am scaning hbase a table with Scan and I am using PrefixFilter. As I 
> understand, it scans the whole table and run the filter on every row. 
> But why it does not stop after finding row without the desired prefix? 
> If it did not find the prefix, if should return true in 
> filterAllRemaining calling.
> Combining this with possible specifing the start row in Scan object, one 
> can very fast filter only rows with the desired prefix.
> I am using hbase 0.20 from trunk.
> Regards
> Matus Zamborsky

View raw message