[ 
https://issues.apache.org/jira/browse/HBASE-11144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14276585#comment-14276585
 ] 

Lars Hofhansl commented on HBASE-11144:
---------------------------------------

bq. We need to add this as a client feature[...]?

Maybe. It's not really that hard to issue a few scans.

Finding a small sub-range out of a very large set of rows is precisely what 
HBase is good at, so I am bit surprised we need this.
A filter like this implementing skip-scans is good for the equivalent of a IN 
(v1, v2, v3, v4, ...) query, i.e. many point queries (or Gets) that can now be 
executed in a single RPC. AFAIK that is what Phoenix uses its filter for. Maybe 
it'll work too if the individual ranges are small.
Once the retrieved ranges approach a certain size (maybe 1000's or 10000's of 
rows) I doubt this will be better over multiple scan RPCs. Especially when 
those are farmed out in parallel (as Phoenix does).

Note that Phoenix parallelizes scan requests (so some of the perf comes from 
using more resources of the cluster).


> Filter to support scanning multiple row key ranges
> --------------------------------------------------
>
>                 Key: HBASE-11144
>                 URL: https://issues.apache.org/jira/browse/HBASE-11144
>             Project: HBase
>          Issue Type: Improvement
>          Components: Filters
>            Reporter: Jiajia Li
>            Assignee: Jiajia Li
>             Fix For: 2.0.0, 1.1.0
>
>         Attachments: HBASE_11144_4.patch, HBASE_11144_V10.patch, 
> HBASE_11144_V11.patch, HBASE_11144_V12.patch, HBASE_11144_V13.patch, 
> HBASE_11144_V14.patch, HBASE_11144_V15.patch, HBASE_11144_V16.patch, 
> HBASE_11144_V17.patch, HBASE_11144_V18.patch, HBASE_11144_V5.patch, 
> HBASE_11144_V6.patch, HBASE_11144_V7.patch, HBASE_11144_V9.patch, 
> MultiRowRangeFilter.patch, MultiRowRangeFilter2.patch, 
> MultiRowRangeFilter3.patch, hbase_11144_V8.patch
>
>
> HBase is quite efficient when scanning only one small row key range. If user 
> needs to specify multiple row key ranges in one scan, the typical solutions 
> are: 1. through FilterList which is a list of row key Filters, 2. using the 
> SQL layer over HBase to join with two table, such as hive, phoenix etc. 
> However, both solutions are inefficient. Both of them can’t utilize the range 
> info to perform fast forwarding during scan which is quite time consuming. If 
> the number of ranges are quite big (e.g. millions), join is a proper solution 
> though it is slow. However, there are cases that user wants to specify a 
> small number of ranges to scan (e.g. <1000 ranges). Both solutions can’t 
> provide satisfactory performance in such case. 
> We provide this filter (MultiRowRangeFilter) to support such use case (scan 
> multiple row key ranges), which can construct the row key ranges from user 
> specified list and perform fast-forwarding during scan. Thus, the scan will 
> be quite efficient. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to