Details
Description
Was going through JsonUtilClient#toBlockLocation code.
Below is the relevant code snippet.
JsonUtilClient.java
/** Convert a Json map to BlockLocation. **/ static BlockLocation toBlockLocation(Map<?, ?> m) throws IOException{ ... ... boolean corrupt = Boolean. getBoolean(m.get("corrupt").toString()); ... ... }
According to java docs for Boolean#getBoolean
Returns true if and only if the system property named by the argument exists and is equal to the string "true".
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.
Attachments
Attachments
Issue Links
- is broken by
-
HDFS-11156 Add new op GETFILEBLOCKLOCATIONS to WebHDFS REST API
- Resolved