You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Gray (JIRA)" <ji...@apache.org> on 2011/09/14 22:59:09 UTC

[jira] [Created] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

FilterList.filterKeyValue can return suboptimal ReturnCodes
-----------------------------------------------------------

                 Key: HBASE-4410
                 URL: https://issues.apache.org/jira/browse/HBASE-4410
             Project: HBase
          Issue Type: Improvement
          Components: filters
            Reporter: Jonathan Gray
            Assignee: Jonathan Gray
            Priority: Minor
             Fix For: 0.92.0


FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.

For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.

For AND conditions, we can always pick the *most restrictive* return code.

For OR conditions, we must always pick the *least restrictive* return code.

This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

Jonathan Gray commented on HBASE-4410:
--------------------------------------

Not working on this right now, punt it!  Thanks Lars

On Mar 21, 2012, at 3:31 PM, "Lars Hofhansl (Updated) (JIRA)"


                
> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

jiraposter@reviews.apache.org commented on HBASE-4410:
------------------------------------------------------



bq.  On 2011-09-14 22:22:06, Lars Hofhansl wrote:
bq.  > /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java, line 199
bq.  > <https://reviews.apache.org/r/1908/diff/1/?file=40598#file40598line199>
bq.  >
bq.  >     You could break here, no?
bq.  >     There will never be more restrictive filter among the other filters.
bq.  
bq.  Jonathan Gray wrote:
bq.      Another part of the changes here is ensuring that filterKeyValue() gets called on every filter, regardless of what the other filters are returning.  Otherwise, filters down the list will have indeterminate behavior.

(See my addition to TestFilterList.testHintPassThru() which would fail without this change)


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1908/#review1899
-----------------------------------------------------------


On 2011-09-14 21:52:34, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1908/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-14 21:52:34)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Michael Stack, Prakash Khemani, and Kannan Muthukkaruppan.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
bq.  
bq.  For example, if you have F1 AND F2, F1 returns SKIP. It immediately returns the SKIP. However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
bq.  
bq.  For AND conditions, we can always pick the most restrictive return code.
bq.  
bq.  For OR conditions, we must always pick the least restrictive return code.
bq.  
bq.  This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.
bq.  
bq.  
bq.  This addresses bug HBASE-4410.
bq.      https://issues.apache.org/jira/browse/HBASE-4410
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/filter/Filter.java 1170860 
bq.    /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java 1170860 
bq.    /src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java 1170860 
bq.  
bq.  Diff: https://reviews.apache.org/r/1908/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Adds new tests to TestFilterList.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.



> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

jiraposter@reviews.apache.org commented on HBASE-4410:
------------------------------------------------------



bq.  On 2011-09-14 22:22:06, Lars Hofhansl wrote:
bq.  > /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java, line 199
bq.  > <https://reviews.apache.org/r/1908/diff/1/?file=40598#file40598line199>
bq.  >
bq.  >     You could break here, no?
bq.  >     There will never be more restrictive filter among the other filters.

Another part of the changes here is ensuring that filterKeyValue() gets called on every filter, regardless of what the other filters are returning.  Otherwise, filters down the list will have indeterminate behavior.


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1908/#review1899
-----------------------------------------------------------


On 2011-09-14 21:52:34, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1908/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-14 21:52:34)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Michael Stack, Prakash Khemani, and Kannan Muthukkaruppan.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
bq.  
bq.  For example, if you have F1 AND F2, F1 returns SKIP. It immediately returns the SKIP. However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
bq.  
bq.  For AND conditions, we can always pick the most restrictive return code.
bq.  
bq.  For OR conditions, we must always pick the least restrictive return code.
bq.  
bq.  This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.
bq.  
bq.  
bq.  This addresses bug HBASE-4410.
bq.      https://issues.apache.org/jira/browse/HBASE-4410
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/filter/Filter.java 1170860 
bq.    /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java 1170860 
bq.    /src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java 1170860 
bq.  
bq.  Diff: https://reviews.apache.org/r/1908/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Adds new tests to TestFilterList.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.



> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

Lars Hofhansl updated HBASE-4410:
---------------------------------

    Fix Version/s:     (was: 0.94.0)
                   0.96.0

This would have been nice for 0.94. I think it's too late, though.
@Jon: Are you still working on this?
                
> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

jiraposter@reviews.apache.org commented on HBASE-4410:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1908/#review1960
-----------------------------------------------------------



/src/main/java/org/apache/hadoop/hbase/filter/Filter.java
<https://reviews.apache.org/r/1908/#comment4439>

    Would you ever want to insert a value in between any of these?  Or do the values of these ordinals have no meaning?



/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java
<https://reviews.apache.org/r/1908/#comment4441>

    Is this comment right?  MUST_PASS_ALL seems 'most restrictive', not 'least restrictive'.


- Michael


On 2011-09-14 21:52:34, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1908/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-14 21:52:34)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Michael Stack, Prakash Khemani, and Kannan Muthukkaruppan.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
bq.  
bq.  For example, if you have F1 AND F2, F1 returns SKIP. It immediately returns the SKIP. However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
bq.  
bq.  For AND conditions, we can always pick the most restrictive return code.
bq.  
bq.  For OR conditions, we must always pick the least restrictive return code.
bq.  
bq.  This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.
bq.  
bq.  
bq.  This addresses bug HBASE-4410.
bq.      https://issues.apache.org/jira/browse/HBASE-4410
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/filter/Filter.java 1170860 
bq.    /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java 1170860 
bq.    /src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java 1170860 
bq.  
bq.  Diff: https://reviews.apache.org/r/1908/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Adds new tests to TestFilterList.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.



> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

Jonathan Gray updated HBASE-4410:
---------------------------------

    Attachment: HBASE-4410-v1.patch

Implements changes described in description and includes unit test.  New test and existing tests are passing, kicking off full suite now.

> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

jiraposter@reviews.apache.org commented on HBASE-4410:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1908/#review1961
-----------------------------------------------------------

Ship it!


Looks good.  Can address nits on commit.

- Michael


On 2011-09-14 21:52:34, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1908/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-14 21:52:34)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Michael Stack, Prakash Khemani, and Kannan Muthukkaruppan.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
bq.  
bq.  For example, if you have F1 AND F2, F1 returns SKIP. It immediately returns the SKIP. However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
bq.  
bq.  For AND conditions, we can always pick the most restrictive return code.
bq.  
bq.  For OR conditions, we must always pick the least restrictive return code.
bq.  
bq.  This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.
bq.  
bq.  
bq.  This addresses bug HBASE-4410.
bq.      https://issues.apache.org/jira/browse/HBASE-4410
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/filter/Filter.java 1170860 
bq.    /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java 1170860 
bq.    /src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java 1170860 
bq.  
bq.  Diff: https://reviews.apache.org/r/1908/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Adds new tests to TestFilterList.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.



> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

Ted Yu updated HBASE-4410:
--------------------------

    Fix Version/s:     (was: 0.92.0)
                   0.94.0

Optimization for 0.94
                
> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.94.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

stack commented on HBASE-4410:
------------------------------

Any comeback on the above feedback?
                
> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

stack updated HBASE-4410:
-------------------------

    Fix Version/s:     (was: 0.96.0)

Moving an improvement out of 0.96; move it back if you disagree JG
                
> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: Filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

jiraposter@reviews.apache.org commented on HBASE-4410:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1908/
-----------------------------------------------------------

Review request for hbase, Dhruba Borthakur, Michael Stack, Prakash Khemani, and Kannan Muthukkaruppan.


Summary
-------

FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.

For example, if you have F1 AND F2, F1 returns SKIP. It immediately returns the SKIP. However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.

For AND conditions, we can always pick the most restrictive return code.

For OR conditions, we must always pick the least restrictive return code.

This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.


This addresses bug HBASE-4410.
    https://issues.apache.org/jira/browse/HBASE-4410


Diffs
-----

  /src/main/java/org/apache/hadoop/hbase/filter/Filter.java 1170860 
  /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java 1170860 
  /src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java 1170860 

Diff: https://reviews.apache.org/r/1908/diff


Testing
-------

Adds new tests to TestFilterList.


Thanks,

Jonathan



> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

stack commented on HBASE-4410:
------------------------------

@Lars You OK with Jon's comeback?

> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

jiraposter@reviews.apache.org commented on HBASE-4410:
------------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1908/#review1899
-----------------------------------------------------------



/src/main/java/org/apache/hadoop/hbase/filter/FilterList.java
<https://reviews.apache.org/r/1908/#comment4382>

    You could break here, no?
    There will never be more restrictive filter among the other filters.


- Lars


On 2011-09-14 21:52:34, Jonathan Gray wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1908/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-14 21:52:34)
bq.  
bq.  
bq.  Review request for hbase, Dhruba Borthakur, Michael Stack, Prakash Khemani, and Kannan Muthukkaruppan.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
bq.  
bq.  For example, if you have F1 AND F2, F1 returns SKIP. It immediately returns the SKIP. However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
bq.  
bq.  For AND conditions, we can always pick the most restrictive return code.
bq.  
bq.  For OR conditions, we must always pick the least restrictive return code.
bq.  
bq.  This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.
bq.  
bq.  
bq.  This addresses bug HBASE-4410.
bq.      https://issues.apache.org/jira/browse/HBASE-4410
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /src/main/java/org/apache/hadoop/hbase/filter/Filter.java 1170860 
bq.    /src/main/java/org/apache/hadoop/hbase/filter/FilterList.java 1170860 
bq.    /src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java 1170860 
bq.  
bq.  Diff: https://reviews.apache.org/r/1908/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Adds new tests to TestFilterList.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Jonathan
bq.  
bq.



> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

Jonathan Gray commented on HBASE-4410:
--------------------------------------

Actually I think Lars is correct.  It's a question of whether we should execute all filters in a list filterKeyValue() or not.

I think the right behavior is actually just to make it execute how one would expect this type of conditional to execute:

if (conditionA && conditionB)

If conditionA fails, we don't expect conditionB to be executed.

if (conditionA || conditionB)

If conditionA passes, we don't expect conditionB to be executed.

This was the previous behavior and my patch undoes it.  I will work on a new patch.

> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4410) FilterList.filterKeyValue can return suboptimal ReturnCodes

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

Jonathan Gray commented on HBASE-4410:
--------------------------------------

My comeback is that Lars is right and I f-ed it up.  I was supposed to make a new patch but forgot about this.  I was a bit angry I came up with such a nice elegant solution that was fundamentally broken.  ;)

Will try to get to this next week.
                
> FilterList.filterKeyValue can return suboptimal ReturnCodes
> -----------------------------------------------------------
>
>                 Key: HBASE-4410
>                 URL: https://issues.apache.org/jira/browse/HBASE-4410
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: Jonathan Gray
>            Assignee: Jonathan Gray
>            Priority: Minor
>             Fix For: 0.92.0
>
>         Attachments: HBASE-4410-v1.patch
>
>
> FilterList.filterKeyValue does not always return the most optimal ReturnCode in both the AND and OR conditions.
> For example, if you have F1 AND F2, F1 returns SKIP.  It immediately returns the SKIP.  However, if F2 would have returned NEXT_COL or NEXT_ROW or SEEK_NEXT_USING_HINT, we would actually be able to return the more optimal ReturnCode from F2.
> For AND conditions, we can always pick the *most restrictive* return code.
> For OR conditions, we must always pick the *least restrictive* return code.
> This JIRA is to review the FilterList.filterKeyValue() method to try and make it more optimal and to add a new unit test which verifies the correct behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira