HBASE-21077 MR job launched by hbase incremental backup command failed with FileNotFoundException
Signed-off-by: tedyu <yuzhihong@gmail.com>
This commit is contained in:
parent
a42556553a
commit
f62c8201b6
|
@ -178,7 +178,7 @@ public class IncrementalBackupManager extends BackupManager {
|
|||
Set<String> set = new HashSet<>();
|
||||
for (int i=0; i < logFromSystemTable.size(); i++) {
|
||||
WALItem item = logFromSystemTable.get(i);
|
||||
set.add(item.walFile);
|
||||
set.add((new Path(item.walFile)).getName());
|
||||
}
|
||||
return set;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,8 @@ import org.apache.hadoop.hbase.client.HBaseAdmin;
|
|||
import org.apache.hadoop.hbase.client.HTable;
|
||||
import org.apache.hadoop.hbase.client.Put;
|
||||
import org.apache.hadoop.hbase.client.Table;
|
||||
import org.apache.hadoop.hbase.master.cleaner.LogCleaner;
|
||||
import org.apache.hadoop.hbase.master.cleaner.TimeToLiveLogCleaner;
|
||||
import org.apache.hadoop.hbase.security.HadoopSecurityEnabledUserProviderForTesting;
|
||||
import org.apache.hadoop.hbase.security.UserProvider;
|
||||
import org.apache.hadoop.hbase.security.access.SecureTestUtil;
|
||||
|
@ -288,6 +290,11 @@ public class TestBackupBase {
|
|||
BackupManager.decorateMasterConfiguration(conf1);
|
||||
BackupManager.decorateRegionServerConfiguration(conf1);
|
||||
conf1.set(HConstants.ZOOKEEPER_ZNODE_PARENT, "/1");
|
||||
// Set TTL for old WALs to 1 sec to enforce fast cleaning of an archived
|
||||
// WAL files
|
||||
conf1.setLong(TimeToLiveLogCleaner.TTL_CONF_KEY, 1000);
|
||||
conf1.setLong(LogCleaner.OLD_WALS_CLEANER_THREAD_TIMEOUT_MSEC, 1000);
|
||||
|
||||
// Set MultiWAL (with 2 default WAL files per RS)
|
||||
conf1.set(WALFactory.WAL_PROVIDER, provider);
|
||||
TEST_UTIL.startMiniCluster();
|
||||
|
|
|
@ -157,6 +157,8 @@ public class TestIncrementalBackup extends TestBackupBase {
|
|||
int NB_ROWS_FAM2 = 7;
|
||||
HTable t3 = insertIntoTable(conn, table1, fam2Name, 2, NB_ROWS_FAM2);
|
||||
t3.close();
|
||||
// Wait for 5 sec to make sure that old WALs were deleted
|
||||
Thread.sleep(5000);
|
||||
|
||||
// #3 - incremental backup for multiple tables
|
||||
request = createBackupRequest(BackupType.INCREMENTAL, tables, BACKUP_ROOT_DIR);
|
||||
|
|
Loading…
Reference in New Issue