diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreService.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreService.java index 130e53b..c47d6ed 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreService.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/mapreduce/MapReduceRestoreService.java @@ -137,7 +137,8 @@ public class MapReduceRestoreService implements IncrementalRestoreService { { Configuration conf = getConf(); FileSystem fs = FileSystem.get(conf); - String tmp = conf.get("hbase.tmp.dir"); + String tmp = conf.get(HConstants.TEMPORARY_FS_DIRECTORY_KEY, + HConstants.DEFAULT_TEMPORARY_HDFS_DIRECTORY); Path path = new Path(tmp + Path.SEPARATOR + "bulk_output-"+tableName + "-" + EnvironmentEdgeManager.currentTime()); fs.deleteOnExit(path); diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java index 1b05aa9..ad32207 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java @@ -73,7 +73,6 @@ public class RestoreServerUtil { protected String backupId; protected FileSystem fs; - private final String RESTORE_TMP_PATH = "/tmp"; private final Path restoreTmpPath; // store table name and snapshot dir mapping @@ -85,9 +84,8 @@ public class RestoreServerUtil { this.backupRootPath = backupRootPath; this.backupId = backupId; this.fs = backupRootPath.getFileSystem(conf); - this.restoreTmpPath = new Path(conf.get("hbase.fs.tmp.dir") != null? - conf.get("hbase.fs.tmp.dir"): RESTORE_TMP_PATH, - "restore"); + this.restoreTmpPath = new Path(conf.get(HConstants.TEMPORARY_FS_DIRECTORY_KEY, + HConstants.DEFAULT_TEMPORARY_HDFS_DIRECTORY), "restore"); } /**