[
https://issues.apache.org/jira/browse/HBASE-21922?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771548#comment-16771548
]
Guanghao Zhang edited comment on HBASE-21922 at 2/19/19 4:20 AM:
-----------------------------------------------------------------
[INFO] Running org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.779
s <<< FAILURE! - in
org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter
[ERROR]
testRowPrefixBloomFilter(org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter)
Time elapsed: 1.34 s <<< FAILURE!
java.lang.AssertionError: False negatives: 4 expected:<0> but was:<4>
at
org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter.testRowPrefixBloomFilter(TestRowPrefixBloomFilter.java:269)
The ut failed as index.rootBlockContainingKey(key, keyOffset, keyLength) may
return -1 when the key for bloom is small than the first index key... Use the
case in Jira Description, the first index key is '1234',
index.rootBlockContainingKey return -1 for key '123', so the bloom filter say
'123' is not in the file.
FYI [~andrewcheng]
was (Author: zghaobac):
[INFO] Running org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.779 s
<<< FAILURE! - in org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter
[ERROR]
testRowPrefixBloomFilter(org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter)
Time elapsed: 1.34 s <<< FAILURE!
java.lang.AssertionError: False negatives: 4 expected:<0> but was:<4>
at
org.apache.hadoop.hbase.regionserver.TestRowPrefixBloomFilter.testRowPrefixBloomFilter(TestRowPrefixBloomFilter.java:269)
The ut failed as index.rootBlockContainingKey(key, keyOffset, keyLength) may
return -1 when the key for bloom is small than the first index key...
FYI [~andrewcheng]
> BloomContext#sanityCheck may failed when use ROWPREFIX_DELIMITED bloom filter
> -----------------------------------------------------------------------------
>
> Key: HBASE-21922
> URL: https://issues.apache.org/jira/browse/HBASE-21922
> Project: HBase
> Issue Type: Bug
> Reporter: Guanghao Zhang
> Assignee: Guanghao Zhang
> Priority: Major
> Attachments: HBASE-21922.master.001.patch
>
>
> Assume we use '5' as the delimiter, there are rowkeys: row1 is smaller than
> row2
> {code:java}
> row1: 12345xxx
> row2: 1235xxxx{code}
> When use ROWPREFIX_DELIMITED bloom filter, the rowkey write to bloom filter
> are
> {code:java}
> row1's key for bloom filter: 1234
> row2's key for bloom fitler: 123{code}
> The row1's key for bloom filter is bigger than row2. Then
> BloomContext#sanityCheck will failed.
> {code:java}
> private void sanityCheck(Cell cell) throws IOException {
> if (this.getLastCell() != null) {
> LOG.debug("Current cell " + cell + ", prevCell = " + this.getLastCell());
> if (comparator.compare(cell, this.getLastCell()) <= 0) {
> throw new IOException("Added a key not lexically larger than" + "
> previous. Current cell = "
> + cell + ", prevCell = " + this.getLastCell());
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)