hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksandr Maksymenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13704) Hbase throws OutOfOrderScannerNextException exception when MultiRowRangeFilter is used.
Date Tue, 19 May 2015 09:03:00 GMT

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

Aleksandr Maksymenko commented on HBASE-13704:
----------------------------------------------

Please look at test.
{code}
    public void testOutOfOrderScannerNextException() throws Exception {
        MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList(
                new MultiRowRangeFilter.RowRange(Bytes.toBytes("b"), true, Bytes.toBytes("c"),
true),
                new MultiRowRangeFilter.RowRange(Bytes.toBytes("d"), true, Bytes.toBytes("e"),
true)
        ));
        filter.filterRowKey(Bytes.toBytes("a"), 0, 1);
        assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(null));
        filter.filterRowKey(Bytes.toBytes("b"), 0, 1);
        assertEquals(Filter.ReturnCode.INCLUDE, filter.filterKeyValue(null));
        filter.filterRowKey(Bytes.toBytes("c"), 0, 1);
        assertEquals(Filter.ReturnCode.INCLUDE, filter.filterKeyValue(null));
        filter.filterRowKey(Bytes.toBytes("d"), 0, 1);
        assertEquals(Filter.ReturnCode.INCLUDE, filter.filterKeyValue(null));
        filter.filterRowKey(Bytes.toBytes("e"), 0, 1);
        assertEquals(Filter.ReturnCode.INCLUDE, filter.filterKeyValue(null));
    }
{code}

> Hbase throws OutOfOrderScannerNextException exception when MultiRowRangeFilter is used.
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-13704
>                 URL: https://issues.apache.org/jira/browse/HBASE-13704
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 1.1.0
>            Reporter: Aleksandr Maksymenko
>
> When using filter MultiRowRangeFilter with ranges closed to each other that there are
no rows between ranges, then OutOfOrderScannerNextException is throwed.
> In filterRowKey method when range is switched to the next range, currentReturnCode is
set to SEEK_NEXT_USING_HINT (MultiRowRangeFilter: 118 in v1.1.0). But if new range is already
contain this row, then we should include this row, not to seek for another one.
> Replacing line 118 to this code seems to be working fine:
> {code}
> if (range.contains(buffer, offset, length)) {
>     currentReturnCode = ReturnCode.INCLUDE;
> } else {
>     currentReturnCode = ReturnCode.SEEK_NEXT_USING_HINT;
> }
> {code}



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

Mime
View raw message