joshelser commented on a change in pull request #740: HBASE-23197 
'IllegalArgumentException: Wrong FS' on edits replay when…
URL: https://github.com/apache/hbase/pull/740#discussion_r344984774
 
 

 ##########
 File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/backup/TestHFileArchiving.java
 ##########
 @@ -128,6 +137,61 @@ public static void cleanupTest() throws Exception {
     POOL.shutdownNow();
   }
 
+  @Test
+  public void 
testArchiveStoreFilesDifferentFileSystemsWallWithSchemaPlainRoot() throws 
Exception {
+    String walDir = "mockFS://mockFSAuthority:9876/mockDir/wals/";
+    testArchiveStoreFilesDifferentFileSystems(walDir, "/hbase", walDir);
+  }
+
+  @Test
+  public void 
testArchiveStoreFilesDifferentFileSystemsWallNullRootWithSchema() throws 
Exception {
+    String rootDir = "testFS://test:5432/hbase/";
+    testArchiveStoreFilesDifferentFileSystems(null, rootDir, rootDir);
+  }
+
+  @Test
+  public void testArchiveStoreFilesDifferentFileSystemsWallNullPlainRoot() 
throws Exception {
+    String rootDir = "/hbase/";
+    testArchiveStoreFilesDifferentFileSystems(null, rootDir, rootDir);
+  }
+
+  @Test
+  public void testArchiveStoreFilesDifferentFileSystemsWallAndRootSame() 
throws Exception {
+    String rootDir = "/hbase/";
+    testArchiveStoreFilesDifferentFileSystems("/hbase/wals/", rootDir, 
rootDir);
+  }
+
+  private void testArchiveStoreFilesDifferentFileSystems(String walDir, String 
rootDir,
+      String expectedBase) throws IOException {
+    FileSystem mockedFileSystem = mock(FileSystem.class);
+    Configuration conf = new Configuration(UTIL.getConfiguration());
+    if(walDir != null)
 
 Review comment:
   checkstyle `if (walDir..)`

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