DieterDP-ng commented on code in PR #6370: URL: https://github.com/apache/hbase/pull/6370#discussion_r1867655307
########## hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestIncrementalBackup.java: ########## @@ -235,6 +277,92 @@ public void TestIncBackupRestore() throws Exception { } } + @Test + public void TestIncBackupRestoreWithOriginalSplits() throws Exception { + byte[] fam1 = Bytes.toBytes("f"); + byte[] mobFam = Bytes.toBytes("mob"); + + List<TableName> tables = Lists.newArrayList(table1); + TableDescriptor newTable1Desc = + TableDescriptorBuilder.newBuilder(table1Desc).setColumnFamily(ColumnFamilyDescriptorBuilder + .newBuilder(mobFam).setMobEnabled(true).setMobThreshold(5L).build()).build(); + TEST_UTIL.getAdmin().modifyTable(newTable1Desc); + + try (Connection conn = ConnectionFactory.createConnection(conf1)) { + BackupAdminImpl backupAdmin = new BackupAdminImpl(conn); + BackupRequest request = createBackupRequest(BackupType.FULL, tables, BACKUP_ROOT_DIR); + String fullBackupId = backupAdmin.backupTables(request); + assertTrue(checkSucceeded(fullBackupId)); + + TableName[] fromTables = new TableName[] { table1 }; + TableName[] toTables = new TableName[] { table1_restore }; + backupAdmin.restore(BackupUtils.createRestoreRequest(BACKUP_ROOT_DIR, fullBackupId, false, + fromTables, toTables, true, true)); + + Table table = conn.getTable(table1_restore); + Assert.assertEquals(HBaseTestingUtil.countRows(table), NB_ROWS_IN_BATCH); Review Comment: The expected value should be the first parameter. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org