private void alterForPolicyTest(final MobCompactPartitionPolicy type) throws Exception { hcd1.setMobCompactPartitionPolicy(type); desc.modifyFamily(hcd1); admin.modifyTable(tableName, desc); Pair<Integer, Integer> st; while (null != (st = admin.getAlterStatus(tableName)) && st.getFirst() > 0) { LOG.debug(st.getFirst() + " regions left to update"); Thread.sleep(40); } LOG.info("alter status finished"); }
private void setUpForPolicyTest(String tableNameAsString, MobCompactPartitionPolicy type) throws IOException { tableName = TableName.valueOf(tableNameAsString); hcd1 = new HColumnDescriptor(family1); hcd1.setMobEnabled(true); hcd1.setMobThreshold(10); hcd1.setMobCompactPartitionPolicy(type); desc = new HTableDescriptor(tableName); desc.addFamily(hcd1); admin.createTable(desc); table = conn.getTable(tableName); bufMut = conn.getBufferedMutator(tableName); }
this.hcd.setMobCompactPartitionPolicy(policy); this.hcd.setMobCompactPartitionPolicy(MobCompactPartitionPolicy.DAILY);
private void setUpForPolicyTest(String tableNameAsString, MobCompactPartitionPolicy type) throws IOException { tableName = TableName.valueOf(tableNameAsString); hcd1 = new HColumnDescriptor(family1); hcd1.setMobEnabled(true); hcd1.setMobThreshold(10); hcd1.setMobCompactPartitionPolicy(type); desc = new HTableDescriptor(tableName); desc.addFamily(hcd1); admin.createTable(desc); table = conn.getTable(tableName); bufMut = conn.getBufferedMutator(tableName); }
private void alterForPolicyTest(final MobCompactPartitionPolicy type) throws Exception { hcd1.setMobCompactPartitionPolicy(type); desc.modifyFamily(hcd1); admin.modifyTable(tableName, desc); Pair<Integer, Integer> st; while (null != (st = admin.getAlterStatus(tableName)) && st.getFirst() > 0) { LOG.debug(st.getFirst() + " regions left to update"); Thread.sleep(40); } LOG.info("alter status finished"); }
this.hcd.setMobCompactPartitionPolicy(policy); this.hcd.setMobCompactPartitionPolicy(MobCompactPartitionPolicy.DAILY);