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

Rushabh S Shah edited comment on HDFS-12442 at 9/14/17 10:09 PM:
-----------------------------------------------------------------

Thanks [~cheersyang] for the review.
I don't know whether we would need this jira judging by the developments going 
on in HDFS-11156.
If we still need this patch, I will attach a new patch to address review 
comment.
Lets wait and watch.


was (Author: shahrs87):
Thanks [~cheersyang] for the review.
I don't know whether we would need this jira judging by the developments going 
on in HDFS-11156.
Lets wait and watch.

> WebHdfsFileSystem#getFileBlockLocations will always return 
> BlockLocation#corrupt as false
> -----------------------------------------------------------------------------------------
>
>                 Key: HDFS-12442
>                 URL: https://issues.apache.org/jira/browse/HDFS-12442
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 2.9.0, 3.0.0-alpha2
>            Reporter: Rushabh S Shah
>            Assignee: Rushabh S Shah
>            Priority: Critical
>         Attachments: HDFS-12442-1.patch
>
>
> Was going through {{JsonUtilClient#toBlockLocation}} code.
> Below is the relevant code snippet.
> {code:title=JsonUtilClient.java|borderStyle=solid}
>  /** Convert a Json map to BlockLocation. **/
>   static BlockLocation toBlockLocation(Map<?, ?> m)
>       throws IOException{
>     ...
>     ...  
>     boolean corrupt = Boolean.
>         getBoolean(m.get("corrupt").toString());
>     ...
>     ...
>   }
> {code}
> According to java docs for {{Boolean#getBoolean}}
> {noformat}
> Returns true if and only if the system property named by the argument exists 
> and is equal to the string "true". 
> {noformat}
> I assume, the map value for key {{corrupt}} will be populated with either 
> {{true}} or {{false}}.
> On the client side, {{Boolean#getBoolean}} will look for system property for 
> true or false.
> So it will always return false unless the system property is set for true or 
> false.



--
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