wchevreuil commented on a change in pull request #348: HBASE-22643 : Delete 
region without archiving only if regiondir is pr…
URL: https://github.com/apache/hbase/pull/348#discussion_r303243586
 
 

 ##########
 File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
 ##########
 @@ -526,6 +526,56 @@ public void testCleaningRace() throws Exception {
     }
   }
 
+  @Test
+  public void testArchiveRegionTableAndRegionDirsNull() throws IOException {
+    Path regionDir = new Path(FSUtils.getTableDir(new Path("./"),
+            TableName.valueOf(name.getMethodName())), "abcdef");
+    Path familyDir = new Path(regionDir, "cf");
+    Path rootDir = UTIL.getDataTestDirOnTestFS("testCleaningRace");
+    Path file = new Path(familyDir, "0");
+    Path sourceFile = new Path(rootDir, file);
+    FileSystem fileSystem = UTIL.getTestFileSystem();
+    fileSystem.createNewFile(sourceFile);
 
 Review comment:
   We are almost there. This line is not needed, and neither are lines #531 to 
533, and 535, since we are not doing anything with familyDir, regionDir and 
sourceFile in this test. Basically all we need here is the the fileSystem and 
rootDir itself. 

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


With regards,
Apache Git Services

Reply via email to