You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Rushabh S Shah (JIRA)" <ji...@apache.org> on 2017/09/13 20:40:00 UTC
[jira] [Created] (HDFS-12442)
WebHdfsFileSystem#getFileBlockLocations will always return
BlockLocation#corrupt as false
Rushabh S Shah created HDFS-12442:
-------------------------------------
Summary: 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
Was going through {{JsonUtilClient#toBlockLocation}}
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-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org