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`` -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org