Configuration conf = TEST_UTIL.getConfiguration();
HTableDescriptor htd = new HTableDescriptor("testIndexPutWithOffsetAndLength");
HRegionInfo info = new HRegionInfo(htd.getName(), "ABC".getBytes(), "BBB".getBytes(), false);
HRegion region = HRegion.createHRegion(info, basedir, conf, htd);
IndexSpecification spec = new IndexSpecification("index");
spec.addIndexColumn(new HColumnDescriptor("col"), "ql1", new SpatialPartition(20, 2),
ValueType.String, 18);
byte[] value1 = "AB---CD---EF---GH---IJ---KL---MN---OP---".getBytes();
Put p = new Put("row".getBytes());
p.add("col".getBytes(), "ql1".getBytes(), value1);