hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wangda Tan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-6257) CapacityScheduler REST API produces incorrect JSON - JSON object operationsInfo contains deplicate key
Date Fri, 11 Aug 2017 19:04:00 GMT

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

Wangda Tan commented on YARN-6257:
----------------------------------

[~Tao Yang], thanks for reporting this issue and provide fixes.  IIUC, duplicated keys in
JSON object is not consumable by clients, correct? If it is still consumable by readers but
not convenient, I suggest to not fix it, if it is completely unconsumable, I think we need
find a solution.

[~sunilg], do you think is it make sense to add new fields to the object without touching
the old fields? 

> CapacityScheduler REST API produces incorrect JSON - JSON object operationsInfo contains
deplicate key
> ------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-6257
>                 URL: https://issues.apache.org/jira/browse/YARN-6257
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: capacityscheduler
>    Affects Versions: 2.8.1
>            Reporter: Tao Yang
>            Assignee: Tao Yang
>            Priority: Minor
>         Attachments: YARN-6257.001.patch
>
>
> In response string of CapacityScheduler REST API, scheduler/schedulerInfo/health/operationsInfo
have duplicate key 'entry' as a JSON object :
> {code}
> "operationsInfo":{
>   "entry":{"key":"last-preemption","value":{"nodeId":"N/A","containerId":"N/A","queue":"N/A"}},
>   "entry":{"key":"last-reservation","value":{"nodeId":"N/A","containerId":"N/A","queue":"N/A"}},
>   "entry":{"key":"last-allocation","value":{"nodeId":"N/A","containerId":"N/A","queue":"N/A"}},
>   "entry":{"key":"last-release","value":{"nodeId":"N/A","containerId":"N/A","queue":"N/A"}}
> }
> {code}
> To solve this problem, I suppose the type of operationsInfo field in CapacitySchedulerHealthInfo
class should be converted from Map to List.
> After convert to List, The operationsInfo string will be:
> {code}
> "operationInfos":[
>   {"operation":"last-allocation","nodeId":"N/A","containerId":"N/A","queue":"N/A"},
>   {"operation":"last-release","nodeId":"N/A","containerId":"N/A","queue":"N/A"},
>   {"operation":"last-preemption","nodeId":"N/A","containerId":"N/A","queue":"N/A"},
>   {"operation":"last-reservation","nodeId":"N/A","containerId":"N/A","queue":"N/A"}
> ]
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org


Mime
View raw message