virajjasani commented on a change in pull request #2472:
URL: https://github.com/apache/hbase/pull/2472#discussion_r497331264



##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestExportSnapshotWithTemporaryDirectory.java
##########
@@ -31,24 +27,21 @@
 @Category({MediumTests.class})
 public class TestExportSnapshotWithTemporaryDirectory extends 
TestExportSnapshot {
 
-  protected static String TEMP_DIR = Paths.get("").toAbsolutePath().toString() 
+ Path.SEPARATOR
-      + UUID.randomUUID().toString();
-
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
-    setUpBaseConf(TEST_UTIL.getConfiguration());
+    Configuration conf = TEST_UTIL.getConfiguration();
+    TestExportSnapshot.setUpBaseConf(conf);
     TEST_UTIL.startMiniCluster(3);
+    Path rootDir = 
TEST_UTIL.getMiniHBaseCluster().getMaster().getMasterFileSystem().getRootDir();
+    LOG.info("Root dir: " + rootDir);
+    conf.set(SnapshotDescriptionUtils.SNAPSHOT_WORKING_DIR,
+      new Path(rootDir.getParent(), ".tmpdir").toUri().toString());

Review comment:
       Agree, this is reasonable.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to