[ 
https://issues.apache.org/jira/browse/HDFS-16192?focusedWorklogId=644415&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-644415
 ]

ASF GitHub Bot logged work on HDFS-16192:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Aug/21 15:21
            Start Date: 31/Aug/21 15:21
    Worklog Time Spent: 10m 
      Work Description: jojochuang commented on a change in pull request #3353:
URL: https://github.com/apache/hadoop/pull/3353#discussion_r698896805



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestViewDistributedFileSystem.java
##########
@@ -89,4 +91,30 @@ public void testEmptyDelegationToken() throws IOException {
       }
     }
   }
+
+  @Test
+  public void testRenameWithOptions() throws IOException {
+    Configuration conf = getTestConfiguration();
+    MiniDFSCluster cluster = null;
+    try {
+      cluster = new MiniDFSCluster.Builder(conf).numDataNodes(0).build();
+      URI defaultUri =
+          URI.create(conf.get(CommonConfigurationKeys.FS_DEFAULT_NAME_KEY));
+      conf.set("fs.viewfs.mounttable." + defaultUri.getHost() + 
".linkFallback",
+          defaultUri.toString());
+      conf.setLong(CommonConfigurationKeys.FS_TRASH_INTERVAL_KEY, 30000);
+      try (ViewDistributedFileSystem fileSystem =
+          (ViewDistributedFileSystem) FileSystem.get(conf)) {
+        final Path testDir = new Path("/test");
+        final Path renameDir = new Path("/testRename");
+        fileSystem.mkdirs(testDir);
+        fileSystem.rename(testDir, renameDir, Options.Rename.TO_TRASH);
+        Assert.assertTrue(fileSystem.exists(renameDir));

Review comment:
       ok got it.




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

To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 644415)
    Time Spent: 2.5h  (was: 2h 20m)

> ViewDistributedFileSystem#rename wrongly using src in the place of dst.
> -----------------------------------------------------------------------
>
>                 Key: HDFS-16192
>                 URL: https://issues.apache.org/jira/browse/HDFS-16192
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Uma Maheswara Rao G
>            Assignee: Uma Maheswara Rao G
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 3.4.0, 3.3.2
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> In ViewDistributedFileSystem, we are mistakenly used src path in the place of 
> dst path when finding mount path info.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to