@Test(timeout = 180000)
public void testCompactionOnIndexTableShouldNotRetrieveTTLExpiredData() throws Exception {
ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(TESTING_UTIL);
String userTableName = "testCompactionOnIndexTableShouldNotRetrieveTTLExpiredData";
IndexedHTableDescriptor ihtd = new IndexedHTableDescriptor(userTableName);
HColumnDescriptor hcd =
new HColumnDescriptor("col").setMaxVersions(Integer.MAX_VALUE).setTimeToLive(
TTL_SECONDS - 1);
HColumnDescriptor hcd1 =
new HColumnDescriptor("col1").setMaxVersions(Integer.MAX_VALUE).setTimeToLive(
TTL_SECONDS - 1);
IndexSpecification iSpec = new IndexSpecification("ScanIndexf");
iSpec.addIndexColumn(hcd, "q1", ValueType.String, 10);
iSpec.addIndexColumn(hcd1, "q2", ValueType.String, 10);
ihtd.addFamily(hcd);
ihtd.addFamily(hcd1);
ihtd.addIndex(iSpec);
admin.createTable(ihtd);
ZKAssign.blockUntilNoRIT(zkw);
Configuration conf = TESTING_UTIL.getConfiguration();
HTable table = new HTable(conf, userTableName);