[ https://issues.apache.org/jira/browse/HBASE-22833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16909422#comment-16909422 ]
Hudson commented on HBASE-22833: -------------------------------- Results for branch branch-1.4 [build #962 on builds.a.o|https://builds.apache.org/job/HBase%20Nightly/job/branch-1.4/962/]: (x) *{color:red}-1 overall{color}* ---- details (if available): (x) {color:red}-1 general checks{color} -- For more information [see general report|https://builds.apache.org/job/HBase%20Nightly/job/branch-1.4/957//General_Nightly_Build_Report/] (x) {color:red}-1 jdk7 checks{color} -- For more information [see jdk7 report|https://builds.apache.org/job/HBase%20Nightly/job/branch-1.4/957//JDK7_Nightly_Build_Report/] (x) {color:red}-1 jdk8 hadoop2 checks{color} -- For more information [see jdk8 (hadoop2) report|https://builds.apache.org/job/HBase%20Nightly/job/branch-1.4/957//JDK8_Nightly_Build_Report_(Hadoop2)/] (/) {color:green}+1 source release artifact{color} -- See build output for details. > MultiRowRangeFilter should provide a method for creating a filter which is > functionally equivalent to multiple prefix filters > ----------------------------------------------------------------------------------------------------------------------------- > > Key: HBASE-22833 > URL: https://issues.apache.org/jira/browse/HBASE-22833 > Project: HBase > Issue Type: Wish > Components: Client > Affects Versions: 3.0.0 > Reporter: Itsuki Toyota > Assignee: Itsuki Toyota > Priority: Minor > Fix For: 3.0.0, 1.5.0, 2.3.0, 2.0.6, 2.2.1, 2.1.6, 1.4.11 > > > HI, > I think current formal way to make multiple prefix filters is to create a > _FilterList_ and add _PrefixFilter_ instances to the list: > {code:java} > FilterList allFilters = new FilterList(FilterList.Operator.MUST_PASS_ONE); > allFilters.addFilter(new PrefixFilter(Bytes.toBytes("123"))); > allFilters.addFilter(new PrefixFilter(Bytes.toBytes("456"))); > allFilters.addFilter(new PrefixFilter(Bytes.toBytes("678"))); > scan.setFilter(allFilters); > {code} > (c.f., > https://stackoverflow.com/questions/41074213/hbase-how-to-specify-multiple-prefix-filters-in-a-single-scan-operation > ) > However, in the case of creating a single prefix filter, HBase provides > _scan.setRowPrefixFilter_ method. > This method creates a range filter by setting a start row and a stop row. > The value of a stop row is decided by calling > _calculateTheClosestNextRowKeyForPrefix_ ( c.f., > https://github.com/apache/hbase/blob/master/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Scan.java#L574-L597 > ) > _MultiRowRangeFilter_ could leverage a list of start row and stop row pairs > and _calculateTheClosestNextRowKeyForPrefix_ could compute the stop row value > corresponding to given start row (i.e., a prefix). > I think this kind of filter (a filter which is functionally equivalent to > multiple prefix filters) should be creatable by _MultiRowRangeFilter_ and > it's better than the current formal way. > Cheers, -- This message was sent by Atlassian JIRA (v7.6.14#76016)