[ 
https://issues.apache.org/jira/browse/HDFS-16990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17721083#comment-17721083
 ] 

ASF GitHub Bot commented on HDFS-16990:
---------------------------------------

ayushtkn commented on code in PR #5602:
URL: https://github.com/apache/hadoop/pull/5602#discussion_r1189092588


##########
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java:
##########
@@ -1743,6 +1744,18 @@ public BlockLocation[] getFileBlockLocations(final 
FileStatus status,
     return getFileBlockLocations(status.getPath(), offset, length);
   }
 
+  @Override
+  public FileStatus getFileLinkStatus(final Path f) throws IOException {

Review Comment:
   nit:
   can you change the variable name, instead of  ``f`` use ``path``



##########
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java:
##########
@@ -2265,4 +2265,38 @@ public Map execute(FileSystem fs) throws IOException {
           "because the file system is not DistributedFileSystem.");
     }
   }
+
+  /**
+   * Executor that performs a linkFile-status FileSystemAccess files
+   * system operation.
+   */
+  @InterfaceAudience.Private
+  public static class FSFileLinkStatus
+      implements FileSystemAccess.FileSystemExecutor<Map> {
+    private Path path;

Review Comment:
   can be ``final``



##########
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/FSOperations.java:
##########
@@ -2265,4 +2265,38 @@ public Map execute(FileSystem fs) throws IOException {
           "because the file system is not DistributedFileSystem.");
     }
   }
+
+  /**
+   * Executor that performs a linkFile-status FileSystemAccess files
+   * system operation.
+   */
+  @InterfaceAudience.Private
+  public static class FSFileLinkStatus

Review Comment:
   Add ``` @SuppressWarnings("rawtypes")```



##########
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java:
##########
@@ -546,6 +546,14 @@ public InputStream run() throws Exception {
       response = Response.ok(json).type(MediaType.APPLICATION_JSON).build();
       break;
     }
+    case GETFILELINKSTATUS: {
+      FSOperations.FSFileLinkStatus command =
+          new FSOperations.FSFileLinkStatus(path);
+      Map js = fsExecute(user, command);

Review Comment:
   add  ```@SuppressWarnings("rawtypes")```



##########
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java:
##########
@@ -2056,6 +2060,27 @@ private void testGetSnapshotDiffListing() throws 
Exception {
     }
   }
 
+  private void testGetFileLinkStatus() throws Exception {
+    if (isLocalFS()) {
+      // do not test the the symlink for local FS.

Review Comment:
   nit:
   two times ``the the``





> HttpFS Add Support getFileLinkStatus API
> ----------------------------------------
>
>                 Key: HDFS-16990
>                 URL: https://issues.apache.org/jira/browse/HDFS-16990
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: httpfs
>    Affects Versions: 3.4.0
>            Reporter: Hualong Zhang
>            Assignee: Hualong Zhang
>            Priority: Major
>              Labels: pull-request-available
>
> HttpFS should implement the *getFileLinkStatus* API already implemented 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]

Reply via email to