*/
value = Bytes.toBytes(98L);
id = 35;
bldr = new CompleteIndexBuilder(columnDescriptor,
new IdxIndexDescriptor(QUALIFIER, IdxQualifierType.LONG));
bldr.addKeyValue(new KeyValue(ROW, FAMILY, QUALIFIER, value), id);
Assert.assertTrue(
bldr.finalizeIndex(NUM_KEY_VALUES).lookup(value).contains(id));
/**
* Test double type
*/
value = Bytes.toBytes(9.8D);
id = 899;
bldr = new CompleteIndexBuilder(columnDescriptor,
new IdxIndexDescriptor(QUALIFIER, IdxQualifierType.DOUBLE));
bldr.addKeyValue(new KeyValue(ROW, FAMILY, QUALIFIER, value), id);
Assert.assertTrue(
bldr.finalizeIndex(NUM_KEY_VALUES).lookup(value).contains(id));
/**
* Test the byte array type
*/
value = Bytes.toBytes(this.getClass().getName());
id = 1016;
bldr = new CompleteIndexBuilder(columnDescriptor,
new IdxIndexDescriptor(QUALIFIER, IdxQualifierType.BYTE_ARRAY));
bldr.addKeyValue(new KeyValue(ROW, FAMILY, QUALIFIER, value), id);
Assert.assertTrue(
bldr.finalizeIndex(NUM_KEY_VALUES).lookup(value).contains(id));
}