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

Aaron T. Myers updated HDFS-5403:
---------------------------------

    Attachment: HDFS-5403.patch

Here's a patch which addresses the issue by checking for a {{null}} value in 
{{JsonUtil}} when deserializing the response from WebHdfs and providing a 
default if it is null. I used the same default (0) as what's in the PB 
definition.

> WebHdfs client cannot communicate with older WebHdfs servers post HDFS-5306
> ---------------------------------------------------------------------------
>
>                 Key: HDFS-5403
>                 URL: https://issues.apache.org/jira/browse/HDFS-5403
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: webhdfs
>    Affects Versions: 2.2.0
>            Reporter: Aaron T. Myers
>            Assignee: Aaron T. Myers
>         Attachments: HDFS-5403.patch
>
>
> HDFS-5306 introduced the field infoSecurePort to the DatanodeIDProto PB 
> definition and made it optional for compatibility purposes. However, we don't 
> correctly the handle the case when this field is not present when 
> deserializing the response from a WebHdfs request. This results in an NPE at 
> the client when this occurs.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to