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

Manoj Govindassamy edited comment on HDFS-12473 at 9/19/17 7:05 PM:
--------------------------------------------------------------------

[~mingma], Thanks for handling the upgrade case. HDFS-12473-4.patch LGTM, +1, 
few nits below. 

1. {{CombinedHostsFileReader.java}}
* line 71: The patch is handling JsonMappingException. Spec says #readValue 
using a stream can also throw JsonParseException. Any needs/use in handling 
both? I am ok even otherwise.
* line 72: typo in "Fore backward" -> "For backward"

2. {{CombinedHostsFileWriter.java}}
* line 42: json hosts file sample doesn't have "," separating the entries.


was (Author: manojg):
[~mingma], Thanks for handling the upgrade case. LGTM, +1, few nits below. 

1. {{CombinedHostsFileReader.java}}
* line 71: The patch is handling JsonMappingException. Spec says #readValue 
using a stream can also throw JsonParseException. Any needs/use in handling 
both? I am ok even otherwise.
* line 72: typo in "Fore backward" -> "For backward"

2. {{CombinedHostsFileWriter.java}}
* line 42: json hosts file sample doesn't have "," separating the entries.

> Change hosts JSON file format
> -----------------------------
>
>                 Key: HDFS-12473
>                 URL: https://issues.apache.org/jira/browse/HDFS-12473
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Ming Ma
>            Assignee: Ming Ma
>         Attachments: HDFS-12473-2.patch, HDFS-12473-3.patch, 
> HDFS-12473-4.patch, HDFS-12473-5.patch, HDFS-12473.patch
>
>
> The existing host JSON file format doesn't have a top-level token.
> {noformat}
>   {"hostName": "host1"}
>   {"hostName": "host2", "upgradeDomain": "ud0"}
>   {"hostName": "host3", "adminState": "DECOMMISSIONED"}
>   {"hostName": "host4", "upgradeDomain": "ud2", "adminState": 
> "DECOMMISSIONED"}
>   {"hostName": "host5", "port": 8090}
>   {"hostName": "host6", "adminState": "IN_MAINTENANCE"}
>   {"hostName": "host7", "adminState": "IN_MAINTENANCE", 
> "maintenanceExpireTimeInMS": "112233"}
> {noformat}
> Instead, to conform with the JSON standard it should be like
> {noformat}
> [
>   {"hostName": "host1"},
>   {"hostName": "host2", "upgradeDomain": "ud0"},
>   {"hostName": "host3", "adminState": "DECOMMISSIONED"},
>   {"hostName": "host4", "upgradeDomain": "ud2", "adminState": 
> "DECOMMISSIONED"},
>   {"hostName": "host5", "port": 8090},
>   {"hostName": "host6", "adminState": "IN_MAINTENANCE"},
>   {"hostName": "host7", "adminState": "IN_MAINTENANCE", 
> "maintenanceExpireTimeInMS": "112233"}
> ]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to