[
https://issues.apache.org/jira/browse/HDFS-16952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706660#comment-17706660
]
ASF GitHub Bot commented on HDFS-16952:
---------------------------------------
slfan1989 commented on code in PR #5517:
URL: https://github.com/apache/hadoop/pull/5517#discussion_r1152664763
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java:
##########
@@ -2202,6 +2202,30 @@ public void testStatistics() throws Exception {
cluster.shutdown();
}
}
+
+ @Test
+ public void testLinkTarget() throws Exception {
+ final Configuration conf = WebHdfsTestUtil.createConf();
+
+ cluster = new MiniDFSCluster.Builder(conf)
+ .numDataNodes(3)
+ .build();
+ cluster.waitActive();
+
+ final WebHdfsFileSystem webHdfs =
WebHdfsTestUtil.getWebHdfsFileSystem(conf,
+ WebHdfsConstants.WEBHDFS_SCHEME);
+
+ // Symbolic link
+ Path root = new Path("/webHdfsTest/");
+ Path targetFile = new Path(root, "debug.log");
+ FileSystemTestHelper.createFile(webHdfs, targetFile);
+
+ Path symLink = new Path(root, "debug.link");
+
+ webHdfs.createSymlink(targetFile, symLink, false);
+ assertEquals(webHdfs.getLinkTarget(symLink), targetFile);
+ }
Review Comment:
cluster needs to be shut down.
> Support getLinkTarget API in WebHDFS
> ------------------------------------
>
> Key: HDFS-16952
> URL: https://issues.apache.org/jira/browse/HDFS-16952
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: webhdfs
> Affects Versions: 3.4.0
> Reporter: Hualong Zhang
> Priority: Minor
> Labels: pull-request-available
>
> Support getLinkTarget API in WebHDFS
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]