hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-1807) KeyFilter for filtering based on comparsions of row, column, and qualifiers of KeyValues
Date Tue, 01 Sep 2009 16:36:33 GMT

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

Andrew Purtell commented on HBASE-1807:
---------------------------------------

One minor optimization:

{code}
   public ReturnCode filterKeyValue(KeyValue v) {
-    if (doCompare(rowCompareOp, rowComparator, v.getBuffer(),
-        v.getKeyOffset(), v.getKeyLength())) {
-      return ReturnCode.NEXT_ROW;
     }
     ReturnCode rc = ReturnCode.INCLUDE;
     if (doCompare(familyCompareOp, familyComparator, v.getBuffer(),
         v.getFamilyOffset(), v.getFamilyLength())) {
       rc = ReturnCode.SKIP;
     }
     if (rc == ReturnCode.INCLUDE) {
       if (v.getQualifierLength() > 0) {
         if (doCompare(qualifierCompareOp, qualifierComparator, v.getBuffer(), 
             v.getQualifierOffset(), v.getQualifierLength())) {
           rc = ReturnCode.SKIP;
         }
       }
     }
     return rc;
   }
{code}
 
since I just realized that filterKeyValue is only called if filterRowKey passes.

> KeyFilter for filtering based on comparsions of row, column, and qualifiers of KeyValues
> ----------------------------------------------------------------------------------------
>
>                 Key: HBASE-1807
>                 URL: https://issues.apache.org/jira/browse/HBASE-1807
>             Project: Hadoop HBase
>          Issue Type: New Feature
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>            Priority: Minor
>             Fix For: 0.20.0
>
>         Attachments: HBASE-1807.patch
>
>
> From: Angus He up on hbase-user:
> {quote}
> Subject: Is there any ways to retrieve values whose columns match specific regular expression?
> Is this functionality available in the current implementation? If not, is there any plans
on this?
> {quote}
> See attached patch. Low impact change, can go into 0.20.0. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message