opts.addSplits(MetadataTable.NAME, splits);
}
@Test(timeout = 180000)
public void testMetadataTableSplit() throws Exception {
TableOperations opts = getConnector().tableOperations();
for (int i = 1; i <= 10; i++) {
opts.create("" + i);
}
opts.merge(MetadataTable.NAME, new Text("01"), new Text("02"));
checkMetadataSplits(1, opts);
addSplits(opts, "4 5 6 7 8".split(" "));
checkMetadataSplits(6, opts);
opts.merge(MetadataTable.NAME, new Text("6"), new Text("9"));
checkMetadataSplits(4, opts);
addSplits(opts, "44 55 66 77 88".split(" "));
checkMetadataSplits(9, opts);
opts.merge(MetadataTable.NAME, new Text("5"), new Text("7"));
checkMetadataSplits(6, opts);
opts.merge(MetadataTable.NAME, null, null);
checkMetadataSplits(0, opts);
}