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

Rushabh S Shah commented on HDFS-12459:
---------------------------------------

Apologies for taking so much time to review.
+WebHDFS.md+
{noformat}   
* [`GETFILEBLOCKLOCATIONS`](#Get_File_Block_Locations) (see 
[FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).getFileBlockLocations)
{noformat}

This statement is not correct. We don't use GETFILEBLOCKLOCATIONS in 
WebHdfsFileSystem. Instead we use GET_BLOCK_LOCATIONS to fetch 
{{WebHdfsFileSystem#getFileBlockLocations}}

+JsonUtil.java+
There are 2 references to TreeMap.
There is no need for TreeMap.
I understand we have TreeMap all over that util class. But we shouldn't follow 
that bad practice.
We can change it to HashMap.

+TestWebHDFS.java+
Lets write the test case in a new method instead of appending it to 
{{TestWebHDFS#testWebHdfsGetBlockLocationsWithStorageType}}
I don't see any value in logging the request and response.
I don't have problem logging request since its short but I don't want to see 
the response being logged.

> Fix revert: Add new op GETFILEBLOCKLOCATIONS to WebHDFS REST API
> ----------------------------------------------------------------
>
>                 Key: HDFS-12459
>                 URL: https://issues.apache.org/jira/browse/HDFS-12459
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>            Reporter: Weiwei Yang
>            Assignee: Weiwei Yang
>         Attachments: HDFS-12459.001.patch, HDFS-12459.002.patch, 
> HDFS-12459.003.patch
>
>
> HDFS-11156 was reverted because the implementation was non optimal, based on 
> the suggestion from [~shahrs87], we should avoid creating a dfs client to get 
> block locations because that create extra RPC call. Instead we should use 
> {{NamenodeProtocols#getBlockLocations}} then covert {{LocatedBlocks}} to 
> {{BlockLocation[]}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to