[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Purtell updated HBASE-14206: --- Fix Version/s: 0.98.21 > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug > Components: Filters >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0, 0.98.21 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Busbey updated HBASE-14206: Component/s: Filters > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug > Components: Filters >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean Busbey updated HBASE-14206: Flags: (was: Important) > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nick Dimiduk updated HBASE-14206: - Fix Version/s: (was: 1.1.3) 1.1.2 > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Purtell updated HBASE-14206: --- Fix Version/s: (was: 1.1.2) 1.1.3 This wasn't actually committed to branch-1.1, pushed. > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.3.0, 1.1.3 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Resolution: Fixed Status: Resolved (was: Patch Available) Thanks for reporting the bug, Anton. Thanks for review, Jiajia. > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Attachment: 14206-branch-1.txt > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Fix Version/s: (was: 0.98.14) > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-branch-1.txt, 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Fix Version/s: (was: 1.0.2) > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 0.98.14, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Fix Version/s: 1.3.0 1.1.2 1.2.0 1.0.2 0.98.14 2.0.0 > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Fix For: 2.0.0, 0.98.14, 1.0.2, 1.2.0, 1.1.2, 1.3.0 > > Attachments: 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Attachment: 14206-v1.txt > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Attachments: 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Hadoop Flags: Reviewed Status: Patch Available (was: Open) > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Anton Nazaruk >Priority: Critical > Labels: filter > Attachments: 14206-test.patch, 14206-v1.txt > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu updated HBASE-14206: --- Attachment: 14206-test.patch Change to TestMultiRowRangeFilter that shows the problem. Suggested fix doesn't make the new test pass: {code} diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.ja index e7d8c38..1b1e1a9 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java @@ -237,6 +237,9 @@ public class MultiRowRangeFilter extends FilterBase { if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } + if (!this.initialized) { +this.initialized = true; + } return insertionPosition; } // the row key equals one of the start keys, and the the range exclude the start key {code} > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Ted Yu >Priority: Critical > Labels: filter > Attachments: 14206-test.patch > > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anton Nazaruk updated HBASE-14206: -- Priority: Critical (was: Major) > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Ted Yu >Priority: Critical > Labels: filter > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initialized) { > this.initialized = true; > } > // FIX END > return insertionPosition; > {code} > Thanks, hope it will help. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anton Nazaruk updated HBASE-14206: -- Description: I haven't found a way to attach test program to JIRA issue, so put it below : {code} public class MultiRowRangeFilterTest { byte[] key1Start = new byte[] {-3}; byte[] key1End = new byte[] {-2}; byte[] key2Start = new byte[] {5}; byte[] key2End = new byte[] {6}; byte[] badKey = new byte[] {-10}; @Test public void testRanges() throws IOException { MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( new MultiRowRangeFilter.RowRange(key1Start, true, key1End, false), new MultiRowRangeFilter.RowRange(key2Start, true, key2End, false) )); filter.filterRowKey(badKey, 0, 1); /* * FAILS -- includes BAD key! * Expected :SEEK_NEXT_USING_HINT * Actual :INCLUDE * */ assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(null)); } } {code} It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with included class. I have played some time with algorithm, and found that quick fix may be applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : {code} if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } // FIX START if(!this.initialized) { this.initialized = true; } // FIX END return insertionPosition; {code} Thanks, hope it will help. was: I haven't found a way to attach test program to JIRA issue, so put it below : {code} public class MultiRowRangeFilterTest { byte[] key1Start =new byte[] {-3}; byte[] key1End =new byte[] {-2}; byte[] key2Start =new byte[] {5}; byte[] key2End =new byte[] {6}; byte[] badKey = new byte[] {-10}; @Test public void testRanges() throws IOException { MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( new MultiRowRangeFilter.RowRange(key1Start, true, key1End, false), new MultiRowRangeFilter.RowRange(key2Start, true, key2End, false) )); filter.filterRowKey(badKey, 0, 1); /* * FAILS -- includes BAD key! * Expected :SEEK_NEXT_USING_HINT * Actual :INCLUDE * */ assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(null)); } } {code} It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with included class. I have played some time with algorithm, and found that quick fix may be applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : {code} if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } // FIX START if(!this.initialized) { this.initialized = true; } // FIX END return insertionPosition; {code} Thanks, hope it will help. > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Ted Yu > Labels: filter > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start = new byte[] {-3}; > byte[] key1End = new byte[] {-2}; > byte[] key2Start = new byte[] {5}; > byte[] key2End = new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST_RANGE; > } > // FIX START > if(!this.initial
[jira] [Updated] (HBASE-14206) MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges
[ https://issues.apache.org/jira/browse/HBASE-14206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Anton Nazaruk updated HBASE-14206: -- Description: I haven't found a way to attach test program to JIRA issue, so put it below : {code} public class MultiRowRangeFilterTest { byte[] key1Start =new byte[] {-3}; byte[] key1End =new byte[] {-2}; byte[] key2Start =new byte[] {5}; byte[] key2End =new byte[] {6}; byte[] badKey = new byte[] {-10}; @Test public void testRanges() throws IOException { MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( new MultiRowRangeFilter.RowRange(key1Start, true, key1End, false), new MultiRowRangeFilter.RowRange(key2Start, true, key2End, false) )); filter.filterRowKey(badKey, 0, 1); /* * FAILS -- includes BAD key! * Expected :SEEK_NEXT_USING_HINT * Actual :INCLUDE * */ assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(null)); } } {code} It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with included class. I have played some time with algorithm, and found that quick fix may be applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : {code} if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } // FIX START if(!this.initialized) { this.initialized = true; } // FIX END return insertionPosition; {code} Thanks, hope it will help. was: I haven't found a way to attach test program to JIRA issue, so put it below : {code} public class MultiRowRangeFilterTest { byte[] key1Start =new byte[] {-3}; byte[] key1End =new byte[] {-2}; byte[] key2Start =new byte[] {5}; byte[] key2End =new byte[] {6}; byte[] badKey = new byte[] {-10}; @Test public void testRanges() throws IOException { MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( new MultiRowRangeFilter.RowRange(key1Start, true, key1End, false), new MultiRowRangeFilter.RowRange(key2Start, true, key2End, false) )); filter.filterRowKey(badKey, 0, 1); /* * FAILS -- includes BAD key! * Expected :SEEK_NEXT_USING_HINT * Actual :INCLUDE * */ assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, filter.filterKeyValue(null)); } } {code} It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with included class. I have played some time with algorithm, and found that quick fix may be applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : {code} if (insertionPosition == 0 && !rangeList.get(insertionPosition).contains(rowKey)) { return ROW_BEFORE_FIRST_RANGE; } // FIX START if(!this.initialized) { this.initialized = true; } // FIX END return insertionPosition; {code} Thanks, hope it will help. > MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges > --- > > Key: HBASE-14206 > URL: https://issues.apache.org/jira/browse/HBASE-14206 > Project: HBase > Issue Type: Bug >Affects Versions: 1.1.0 > Environment: linux, java7 >Reporter: Anton Nazaruk >Assignee: Ted Yu > Labels: filter > > I haven't found a way to attach test program to JIRA issue, so put it below : > {code} > public class MultiRowRangeFilterTest { > > byte[] key1Start =new byte[] {-3}; > byte[] key1End =new byte[] {-2}; > byte[] key2Start =new byte[] {5}; > byte[] key2End =new byte[] {6}; > byte[] badKey = new byte[] {-10}; > @Test > public void testRanges() throws IOException { > MultiRowRangeFilter filter = new MultiRowRangeFilter(Arrays.asList( > new MultiRowRangeFilter.RowRange(key1Start, true, key1End, > false), > new MultiRowRangeFilter.RowRange(key2Start, true, key2End, > false) > )); > filter.filterRowKey(badKey, 0, 1); > /* > * FAILS -- includes BAD key! > * Expected :SEEK_NEXT_USING_HINT > * Actual :INCLUDE > * */ > assertEquals(Filter.ReturnCode.SEEK_NEXT_USING_HINT, > filter.filterKeyValue(null)); > } > } > {code} > It seems to happen on 2.0.0-SNAPSHOT too, but I wasn't able to link one with > included class. > I have played some time with algorithm, and found that quick fix may be > applied to "getNextRangeIndex(byte[] rowKey)" method (hbase-client:1.1.0) : > {code} > if (insertionPosition == 0 && > !rangeList.get(insertionPosition).contains(rowKey)) { > return ROW_BEFORE_FIRST