Apache9 commented on code in PR #6461:
URL: https://github.com/apache/hbase/pull/6461#discussion_r1843250036


##########
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?



##########
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshot.java:
##########
@@ -106,6 +106,7 @@ public static void setUpBaseConf(Configuration conf) {
     // If a single node has enough failures (default 3), resource manager will 
blacklist it.
     // With only 2 nodes and tests injecting faults, we don't want that.
     conf.setInt("mapreduce.job.maxtaskfailures.per.tracker", 100);
+    conf.setInt("snapshot.export.default.map.group", 1);

Review Comment:
   Why we need this change?



-- 
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]

Reply via email to