Configuration conf = TEST_UTIL.getConfiguration();
HTableDescriptor htd = new HTableDescriptor("testIndexPutWithNegativeIntDataTypes");
HRegionInfo info = new HRegionInfo(htd.getName(), "ABC".getBytes(), "BBB".getBytes(), false);
// HLog hlog = UTIL.getMiniHBaseCluster().getRegionServer(0).getWAL();
HRegion region = HRegion.createHRegion(info, basedir, conf, htd);
IndexSpecification spec = new IndexSpecification("index");
spec.addIndexColumn(new HColumnDescriptor("col"), "ql1", ValueType.Double, 8);
byte[] value1 = Bytes.toBytes(109.4548957D);
Put p = new Put("row".getBytes());
p.add("col".getBytes(), "ql1".getBytes(), value1);
Put indexPut = IndexUtils.prepareIndexPut(p, spec, region);