Index: src/main/java/org/apache/hadoop/hbase/util/ByteBloomFilter.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/util/ByteBloomFilter.java (revision 1447987) +++ src/main/java/org/apache/hadoop/hbase/util/ByteBloomFilter.java (working copy) @@ -110,6 +110,8 @@ * estimate the ideal false positive rate. */ private static Random randomGeneratorForTest; + + private final static int MIN_BLOOMFILTER_SIZE = 1000; // 1000 bytes /** Bit-value lookup array to prevent doing the same work over and over */ private static final byte [] bitvals = { @@ -497,7 +499,8 @@ int newMaxKeys = this.maxKeys; // while exponentially smaller & folding is lossless - while ( (newByteSize & 1) == 0 && newMaxKeys > (this.keyCount<<1) ) { + while ( (newByteSize & 1) == 0 && newMaxKeys > (this.keyCount<<1) + && newByteSize >= MIN_BLOOMFILTER_SIZE * 2) { pieces <<= 1; newByteSize >>= 1; newMaxKeys >>= 1;