HBASE-3987 Fix a NullPointerException on a failure to load Bloom filter data

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1136689 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-06-16 21:24:57 +00:00
parent ebb63ef44d
commit 6f09e358e0
2 changed files with 8 additions and 4 deletions

View File

@ -335,6 +335,9 @@ Release 0.90.4 - Unreleased
instead of localhost. (Li Pi)
HBASE-3985 Same Region could be picked out twice in LoadBalance
(Jieshan Bean)
HBASE-3987 Fix a NullPointerException on a failure to load Bloom filter data
(Mikhail Bautin)
IMPROVEMENT
HBASE-3882 hbase-config.sh needs to be updated so it can auto-detects the

View File

@ -983,7 +983,8 @@ public class StoreFile {
}
private boolean passesBloomFilter(Scan scan, final SortedSet<byte[]> columns) {
if (this.bloomFilter == null || !scan.isGetScan()) {
BloomFilter bm = this.bloomFilter;
if (bm == null || !scan.isGetScan()) {
return true;
}
byte[] row = scan.getStartRow();
@ -1011,11 +1012,11 @@ public class StoreFile {
// columns, a file might be skipped if using row+col Bloom filter.
// In order to ensure this file is included an additional check is
// required looking only for a row bloom.
return this.bloomFilter.contains(key, bloom) ||
this.bloomFilter.contains(row, bloom);
return bm.contains(key, bloom) ||
bm.contains(row, bloom);
}
else {
return this.bloomFilter.contains(key, bloom);
return bm.contains(key, bloom);
}
}
} catch (IOException e) {