You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/07/12 06:25:18 UTC

[GitHub] [hadoop] umamaheswararao commented on a change in pull request #2132: HDFS-15464: ViewFsOverloadScheme should work when -fs option pointing to remote cluster without mount links

umamaheswararao commented on a change in pull request #2132:
URL: https://github.com/apache/hadoop/pull/2132#discussion_r453274329



##########
File path: hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsOverloadSchemeListStatus.java
##########
@@ -124,6 +126,24 @@ public void testListStatusACL() throws IOException, URISyntaxException {
     }
   }
 
+  /**
+   * Tests that ViewFSOverloadScheme should consider initialized fs as fallback
+   * if there are no mount links configured.
+   */
+  @Test(timeout = 30000)
+  public void testViewFSOverloadSchemeWithoutAnyMountLinks() throws Exception {
+    try (FileSystem fs = FileSystem.get(TEST_DIR.toPath().toUri(), conf)) {
+      ViewFileSystemOverloadScheme vfs = (ViewFileSystemOverloadScheme) fs;
+      Assert.assertEquals(0, vfs.getMountPoints().length);
+      Path testFallBack = new Path("test", FILE_NAME);
+      Assert.assertTrue(vfs.mkdirs(testFallBack));
+      FileStatus[] status = vfs.listStatus(testFallBack.getParent());
+      Assert.assertEquals(FILE_NAME, status[0].getPath().getName());
+      Assert.assertEquals(testFallBack.getName(),

Review comment:
       Done




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



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org