Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.1
-
None
-
Incompatible change, Reviewed
-
The response format of resource manager's REST API endpoint "ws/v1/cluster/scheduler" is optimized, where the "operationInfos" field is converted from a map to list. This change makes the content to be more JSON parser friendly.
Description
In response string of CapacityScheduler REST API, scheduler/schedulerInfo/health/operationsInfo have duplicate key 'entry' as a JSON object :
"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"}} }
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:
"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"} ]