* @throws IllegalArgument
*/
static public HColumnDescriptor colDescFromThrift(ColumnDescriptor in)
throws IllegalArgument {
CompressionType comp = CompressionType.valueOf(in.compression);
BloomFilterDescriptor bloom = null;
if (in.bloomFilterType.compareTo("NONE") != 0) {
if (in.bloomFilterVectorSize > 0 && in.bloomFilterNbHashes > 0) {
bloom = new BloomFilterDescriptor(BloomFilterDescriptor.BloomFilterType
.valueOf(in.bloomFilterType), in.bloomFilterVectorSize,
in.bloomFilterNbHashes);
} else if (in.bloomFilterVectorSize > 0) {
bloom = new BloomFilterDescriptor(BloomFilterDescriptor.BloomFilterType
.valueOf(in.bloomFilterType), in.bloomFilterVectorSize);
} else {
throw new IllegalArgument(
"must specify number of entries for bloom filter");
}