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 "slfan1989 (via GitHub)" <gi...@apache.org> on 2023/04/28 22:57:23 UTC

[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5602: HDFS-16990. HttpFS Add Support getFileLinkStatus API

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


##########
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java:
##########
@@ -1743,6 +1744,19 @@ public BlockLocation[] getFileBlockLocations(final FileStatus status,
     return getFileBlockLocations(status.getPath(), offset, length);
   }
 
+  @Override
+  public FileStatus getFileLinkStatus(final Path f) throws IOException {
+    Map<String, String> params = new HashMap<>();
+    params.put(OP_PARAM, Operation.GETFILELINKSTATUS.toString());
+    HttpURLConnection conn =
+        getConnection(Operation.GETFILELINKSTATUS.getMethod(),
+            params, f, true);

Review Comment:
   one line may be batter
   
   ```
   HttpURLConnection conn =
           getConnection(Operation.GETFILELINKSTATUS.getMethod(), params, f, true);
   ```



-- 
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-unsubscribe@hadoop.apache.org

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