mokai87 commented on code in PR #6461:
URL: https://github.com/apache/hbase/pull/6461#discussion_r1844179989
##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java:
##########
@@ -206,6 +207,48 @@ public void testExportFileSystemStateWithMergeRegion()
throws Exception {
TEST_UTIL.deleteTable(tableName0);
}
+ @Test
+ public void testExportFileSystemStateWithSplitRegion() throws Exception {
+ // disable compaction
+ admin.compactionSwitch(false,
+ admin.getRegionServers().stream().map(a ->
a.getServerName()).collect(Collectors.toList()));
+ // create Table
+ TableName splitTableName = TableName.valueOf(testName.getMethodName());
+ String splitTableSnap = "snapshot-" + testName.getMethodName();
+
admin.createTable(TableDescriptorBuilder.newBuilder(splitTableName).setColumnFamilies(
+
Lists.newArrayList(ColumnFamilyDescriptorBuilder.newBuilder(FAMILY).build())).build());
+
+ // put some data
+ try (Table table = admin.getConnection().getTable(splitTableName)) {
+ table.put(new Put(Bytes.toBytes("row1")).addColumn(FAMILY, null,
Bytes.toBytes("value1")));
Review Comment:
> Use a for loop to do this?
I'll update it if we can keep the UT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]