hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rushabh S Shah (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-12442) WebHdfsFileSystem#getFileBlockLocations will always return BlockLocation#corrupt as false
Date Wed, 13 Sep 2017 23:36:01 GMT

     [ https://issues.apache.org/jira/browse/HDFS-12442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rushabh S Shah updated HDFS-12442:
----------------------------------
    Status: Patch Available  (was: Open)

[~cheersyang]: can you please review.

> 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: 3.0.0-alpha2, 2.9.0
>            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: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message