bbeaudreault commented on code in PR #4933:
URL: https://github.com/apache/hbase/pull/4933#discussion_r1070283059


##########
hbase-backup/src/test/java/org/apache/hadoop/hbase/backup/TestBackupUtils.java:
##########
@@ -73,8 +73,9 @@ public Path run() {
     Path bulkOutputDir = ugi.doAs(new PrivilegedAction<Path>() {
       @Override
       public Path run() {
-        try {
-          return BackupUtils.getBulkOutputDir("test", conf, false);
+        try (FileSystem fs = FileSystem.get(conf)) {
+          Path tmpPath = BackupUtils.getTmpRestoreOutputDir(fs, conf);

Review Comment:
   sorry, one last thing. you repeat this same pattern of calling 
getTmpRestoreOutputDir then getBulkOutputDir a few times, in tests and in the 
merge job. I would add an overload of getBulkOutputDir which does not accept a 
`restoreRootDir`, and passes in this instead. i.e.:
   
   ```java
   public static Path getBulkOutputDir(String tableName, Configuration conf, 
boolean deleteOnExit) {
     return getBulkOutputDir(getTmpRestoreOutputDir(conf), tableName, conf, 
deleteOnExit);
   }



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