You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/11/14 09:34:08 UTC

[GitHub] [hbase] wchevreuil commented on a change in pull request #740: HBASE-23197 'IllegalArgumentException: Wrong FS' on edits replay when…

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

 ##########
 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:
   Fixed on latest commit.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services