[jira] [Commented] (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:comment-tabpanel=15389852#comment-15389852 ] Hudson commented on HBASE-14206: FAILURE: Integrated in HBase-0.98-matrix #375 (See [https://builds.apache.org/job/HBase-0.98-matrix/375/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of (apurtell: rev 3ca07805e19cdeb16cb1828d276d833f5e907b98) * hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java > 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] [Commented] (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:comment-tabpanelfocusedCommentId=14695947#comment-14695947 ] Hudson commented on HBASE-14206: FAILURE: Integrated in HBase-1.1 #614 (See [https://builds.apache.org/job/HBase-1.1/614/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges (Anton Nazaruk) (apurtell: rev e034a76605cc2e15de7bb3f9d477a3dbea92d8b3) * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java 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] [Commented] (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:comment-tabpanelfocusedCommentId=14692278#comment-14692278 ] Hudson commented on HBASE-14206: SUCCESS: Integrated in HBase-1.2-IT #84 (See [https://builds.apache.org/job/HBase-1.2-IT/84/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges (Anton Nazaruk) (tedyu: rev 8954dd88f243da79d00a0f0c722238c421b40f55) * hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java 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] [Commented] (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:comment-tabpanelfocusedCommentId=14681558#comment-14681558 ] Anton Nazaruk commented on HBASE-14206: --- what branch do you use? I've taken code from branch-1.1.0, fixed and test has passed... weird 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] [Commented] (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:comment-tabpanelfocusedCommentId=14681632#comment-14681632 ] Anton Nazaruk commented on HBASE-14206: --- just ran TestMultiRowRangeFilter with applied changes (new test method + applied mentioned fix) from newest origin/master (2.0.0-SNAPSHOT) -- all tests are green 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] [Commented] (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:comment-tabpanelfocusedCommentId=14681831#comment-14681831 ] Jiajia Li commented on HBASE-14206: --- I run the test based on trunk, but with one minor change in test: {code} filter.filterRowKey(badKey, 0, 1); {code} to {code} filter.filterRowKey(KeyValueUtil.createFirstOnRow(badKey)); {code} I think the fix is ok. 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] [Commented] (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:comment-tabpanelfocusedCommentId=14681894#comment-14681894 ] Ted Yu commented on HBASE-14206: The problem and fix were provided by you, Anton. That was why I assigned this to you. You can try applying the patch on branch-1 and 0.98 to see if any modification is needed. If so, you can attach patch for the branch(es). Include branch name in the filename. e.g. 14206-branch-1.txt for branch-1 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] [Commented] (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:comment-tabpanelfocusedCommentId=14681822#comment-14681822 ] Ted Yu commented on HBASE-14206: I use master branch with suggested fix and get: {code} testRanges(org.apache.hadoop.hbase.filter.TestMultiRowRangeFilter) Time elapsed: 0.045 sec FAILURE! java.lang.AssertionError: expected:SEEK_NEXT_USING_HINT but was:null at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:743) at org.junit.Assert.assertEquals(Assert.java:118) at org.junit.Assert.assertEquals(Assert.java:144) at org.apache.hadoop.hbase.filter.TestMultiRowRangeFilter.testRanges(TestMultiRowRangeFilter.java:94) {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] [Commented] (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:comment-tabpanelfocusedCommentId=14681846#comment-14681846 ] Anton Nazaruk commented on HBASE-14206: --- yeah, I've used the same approach as [~jiajia] in order to make it compatible with 2.0.0-SNAPSHOT API, sorry didn't mention it in previous comment ( 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] [Commented] (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:comment-tabpanelfocusedCommentId=14681882#comment-14681882 ] Anton Nazaruk commented on HBASE-14206: --- [~tedyu], what do I have to do with this issue (you've assigned it to me)? I am not hbase committer. If there is a reference of your jira process and issues states - please, share it with me. 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] [Commented] (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:comment-tabpanelfocusedCommentId=14682331#comment-14682331 ] Hudson commented on HBASE-14206: FAILURE: Integrated in HBase-1.1 #608 (See [https://builds.apache.org/job/HBase-1.1/608/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges (Anton Nazaruk) (tedyu: rev dc19c200bac0590798ffda536935290fc9877da8) * hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java 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] [Commented] (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:comment-tabpanelfocusedCommentId=14682351#comment-14682351 ] Hudson commented on HBASE-14206: FAILURE: Integrated in HBase-1.3 #101 (See [https://builds.apache.org/job/HBase-1.3/101/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges (Anton Nazaruk) (tedyu: rev 90b8cc89bdd0e67bdbaab97f24f6d2a3887a651a) * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java * hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java 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] [Commented] (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:comment-tabpanelfocusedCommentId=14682442#comment-14682442 ] Hudson commented on HBASE-14206: SUCCESS: Integrated in HBase-1.2 #101 (See [https://builds.apache.org/job/HBase-1.2/101/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges (Anton Nazaruk) (tedyu: rev 8954dd88f243da79d00a0f0c722238c421b40f55) * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java * hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java 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] [Commented] (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:comment-tabpanelfocusedCommentId=14682408#comment-14682408 ] Hudson commented on HBASE-14206: FAILURE: Integrated in HBase-TRUNK #6714 (See [https://builds.apache.org/job/HBase-TRUNK/6714/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges (Anton Nazaruk) (tedyu: rev a2dbe31b269a9813971ffa76af400d303cb85d63) * hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java 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] [Commented] (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:comment-tabpanelfocusedCommentId=14692353#comment-14692353 ] Hudson commented on HBASE-14206: SUCCESS: Integrated in HBase-1.3-IT #83 (See [https://builds.apache.org/job/HBase-1.3-IT/83/]) HBASE-14206 MultiRowRangeFilter returns records whose rowKeys are out of allowed ranges (Anton Nazaruk) (tedyu: rev 90b8cc89bdd0e67bdbaab97f24f6d2a3887a651a) * hbase-server/src/test/java/org/apache/hadoop/hbase/filter/TestMultiRowRangeFilter.java * hbase-client/src/main/java/org/apache/hadoop/hbase/filter/MultiRowRangeFilter.java 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)