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

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

[~cheersyang] Thanks for quickly putting up a new patch.
Below is the comment I posted in HDFS-11156.
{quote}
Reading back all the comments in this jira, I understand what this jira is 
trying to fix.
If we want to get this jira in 3-beta release, then I would suggest doing the 
following.
Remove dfs client instantiation fromNamenodeWebHdfsMethods. 
Within NamenodeWebHdfsMethods,
directly call NamenodeRpcServer related method which returns LocatedBlocks and 
convert it to BlockLocation[] inside NamenodeWebHdfsMethods.
Remove all the code from WebHdfsFileSystem.
Then I will remove my -1.
{quote}
I see that in the patch, you have removed routing the call through dfs client 
but still I see {{GETFILEBLOCKLOCATIONS}} in {{WebHdfsFileSystem.java}}.
If you want to use {{WebHdfsFileSystem}} then use GET_BLOCK_LOCATIONS.
As I understand the motivation of HDFS-11156 was to fix all the other REST 
clients other than Webhdfs because WebhdfsFilesystem already return 
{{BlockLocation[]}}
+Please remove all the code from WebHdfsFileSystem.+


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

Reply via email to