family.getBloomFilter().filterType;
switch(type) {
case BLOOMFILTER:
bloomFilter = new BloomFilter();
break;
case COUNTING_BLOOMFILTER:
bloomFilter = new CountingBloomFilter();
break;
case RETOUCHED_BLOOMFILTER:
bloomFilter = new RetouchedBloomFilter();
break;
default:
throw new IllegalArgumentException("unknown bloom filter type: " +
type);
}
FSDataInputStream in = fs.open(filterFile);
try {
bloomFilter.readFields(in);
} finally {
fs.close();
}
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("creating bloom filter for " + this.storeName);
}
BloomFilterDescriptor.BloomFilterType type =
family.getBloomFilter().filterType;
switch(type) {
case BLOOMFILTER:
bloomFilter = new BloomFilter(family.getBloomFilter().vectorSize,
family.getBloomFilter().nbHash);
break;
case COUNTING_BLOOMFILTER:
bloomFilter =