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.Int, 4);
spec.addIndexColumn(new HColumnDescriptor("col"), "ql2", ValueType.Float, 4);
byte[] value1 = Bytes.toBytes(-2562351);
Put p = new Put("row".getBytes());
p.add("col".getBytes(), "ql1".getBytes(), value1);
Put indexPut = IndexUtils.prepareIndexPut(p, spec, region);