You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Clint Morgan (JIRA)" <ji...@apache.org> on 2008/04/16 19:07:21 UTC

[jira] Created: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
----------------------------------------------------------------------------------------------

                 Key: HBASE-583
                 URL: https://issues.apache.org/jira/browse/HBASE-583
             Project: Hadoop HBase
          Issue Type: New Feature
          Components: filters
            Reporter: Clint Morgan
            Priority: Minor


This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.

Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Commented: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "Clint Morgan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598834#action_12598834 ] 

Clint Morgan commented on HBASE-583:
------------------------------------

This filter is used to filter based on the value of a given column. It takes an operator (equal, greater, not equal, etc) and either a byte [] value or a byte [] comparator. If we have a byte [] value then we just do a lexicographic compare. If this is not sufficient (eg you want to deserialize a long and then compare it to a fixed long value, then you can pass in your own comparator instead.

This is more powerful than RegexpRowFilter which just does equals comparisons on the columns because we can do no lexicographic comparisons, and operators other than equals.

I would suggest deprecating the functionality (setColumnFilter and the constructor that takes columnFilter) from RegexpRowFilter as well. (This functionality should not even be in there if you believe its name)

Speaking of names, maybe this is not the best name. How about ColumnValueFilter?

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583-v3.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Commented: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598065#action_12598065 ] 

stack commented on HBASE-583:
-----------------------------

Can you update this patch Clint to it applies post HBASE-82 and verify it still works in your environment so I can apply it?   Would suggest you talk up the merits of this filter over regexprowfilter in the class comment and perhaps add examples so its easier on others figure when and how to use it.  Thanks Clint.

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Updated: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-583:
------------------------

       Resolution: Fixed
    Fix Version/s: 0.2.0
           Status: Resolved  (was: Patch Available)

Committed after fixing a javadoc warning.  Thanks for the nice patch Clint.  

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>             Fix For: 0.2.0
>
>         Attachments: hbase-583-v2.patch, hbase-583-v3.patch, hbase-583-v4.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Updated: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "Clint Morgan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clint Morgan updated HBASE-583:
-------------------------------

    Attachment: hbase-583-v3.patch

updated for trunk

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583-v3.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Updated: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-583:
------------------------

    Status: Patch Available  (was: Open)

Marking as patch available so gets reviewed.

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Updated: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "Clint Morgan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clint Morgan updated HBASE-583:
-------------------------------

    Attachment: hbase-583.patch

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Updated: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "Clint Morgan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clint Morgan updated HBASE-583:
-------------------------------

    Attachment: hbase-583-v4.patch

Responded to comments

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583-v3.patch, hbase-583-v4.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Assigned: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "Jim Kellerman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Kellerman reassigned HBASE-583:
-----------------------------------

    Assignee: Clint Morgan

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Commented: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598898#action_12598898 ] 

stack commented on HBASE-583:
-----------------------------

+1 on the name change.  Current name, while 'descriptive', is awkward (The new name will at least get the new Filter more attention).

The above description in '21/May/08 03:41 PM' is better than what is currently in the class comment.  Suggest you use it instead.

The new WritableByteArrayComparable.java Interface is missing a License.

+1 on deprecating the column functionality in RegexpRowFilter.  If you don't mind, please include in your next patch.

Thanks Clint.

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Assignee: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583-v3.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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


[jira] Updated: (HBASE-583) RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to column's values

Posted by "Clint Morgan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clint Morgan updated HBASE-583:
-------------------------------

    Attachment: hbase-583-v2.patch

This is a newer version (requires HBASE-583) renamings.

I was playing around with our serialization methods to try and make comparison for EG longs work as lexicographic comparison on the serialized byte array. I don' t think this approach will work very will for complex types, it was a PITA to get serialized longs to compare correctly. And the resulting serialization was less efficient.

So this approach allows the Range filter to take a WritableByteArrayComparable. This guy can do the deserialization of the byte array and compare it with the range limit value.

Sorry for lack of tests, but I've tested this in our layer above hbase and it seems to work.

> RangeRowFilter, allow to choose rows based on a (lexicographic) comparison to  column's values
> ----------------------------------------------------------------------------------------------
>
>                 Key: HBASE-583
>                 URL: https://issues.apache.org/jira/browse/HBASE-583
>             Project: Hadoop HBase
>          Issue Type: New Feature
>          Components: filters
>            Reporter: Clint Morgan
>            Priority: Minor
>         Attachments: hbase-583-v2.patch, hbase-583.patch
>
>
> This allows one to do equal, greater than, etc comparisons on column values. Only rows with columns which pass comparison get through.
> Its cleaner and more powerful than the "columnFilter" in RegExpRowFilter which only provides equals. I think this functionality should be deprecated in RegExpRowFilter.

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