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

Hadoop QA commented on HBASE-14397:
-----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment 
  
http://issues.apache.org/jira/secure/attachment/12755296/HBASE-14397-trunk-v1.patch
  against master branch at commit 411b516f5156730075558d91b69c3c3e09fb200d.
  ATTACHMENT ID: 12755296

    {color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
                        Please justify why no new tests are needed for this 
patch.
                        Also please list what manual steps were performed to 
verify this patch.

    {color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.0 2.7.0 2.7.1)

    {color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

    {color:green}+1 protoc{color}.  The applied patch does not increase the 
total number of protoc compiler warnings.

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

    {color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

    {color:red}-1 findbugs{color}.  The patch appears to cause Findbugs 
(version 2.0.3) to fail.

    {color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines 
longer than 100

    {color:red}-1 site{color}.  The patch appears to cause mvn post-site goal 
to fail.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
     

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/15548//testReport/
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/15548//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/15548//console

This message is automatically generated.

> PrefixFilter fail to filter all remainings if the prefix is longer than 
> compared rowkey
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-14397
>                 URL: https://issues.apache.org/jira/browse/HBASE-14397
>             Project: HBase
>          Issue Type: Improvement
>          Components: Filters
>    Affects Versions: 2.0.0
>            Reporter: cuijianwei
>            Priority: Minor
>         Attachments: HBASE-14397-trunk-v1.patch
>
>
> The PrefixFilter will filter rowkey as:
> {code}
>   public boolean filterRowKey(Cell firstRowCell) {
>     ...
>     int length = firstRowCell.getRowLength();
>     if (length < prefix.length) return true; // ===> return directly if the 
> prefix is longer
>     ....
>     if ((!isReversed() && cmp > 0) || (isReversed() && cmp < 0)) {
>       passedPrefix = true;
>     }
>     filterRow = (cmp != 0);
>     return filterRow;
>   }
> {code}
> If the prefix is longer than the current rowkey, PrefixFilter#filterRowKey 
> will filter the rowkey directly without comparing, so that won't set 
> 'passedPrefix' flag even the current row is larger than the prefix.
> For example, if there are three rows 'a', 'b' and 'c' in the table, and we 
> issue a scan request as:
> {code}
> hbase(main):001:0> scan 'test_table', {STARTROW => 'a', FILTER => 
> "(PrefixFilter ('aa'))"}
> {code}
> The region server will check the three rows before returning.  In our 
> production, the user issue a scan with a PrefixFilter. The prefix is longer 
> than the rowkeys of following millions of rows, so the region server will 
> continue to check rows until hit a rowkey longer than the prefix. This make 
> the client easily timeout. To fix this case, it seems we need to compare the 
> prefix with the rowkey every serveral rows even when the prefix is longer.



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

Reply via email to