[
https://issues.apache.org/jira/browse/YARN-11514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17759088#comment-17759088
]
ASF GitHub Bot commented on YARN-11514:
---------------------------------------
brumi1024 opened a new pull request, #5989:
URL: https://github.com/apache/hadoop/pull/5989
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
### How was this patch tested?
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
> Extend SchedulerResponse with capacityVector
> --------------------------------------------
>
> Key: YARN-11514
> URL: https://issues.apache.org/jira/browse/YARN-11514
> Project: Hadoop YARN
> Issue Type: Sub-task
> Reporter: Tamas Domok
> Assignee: Benjamin Teke
> Priority: Major
>
> The goal is to add the *capacityVector* to the Scheduler response (XML/JSON).
> - CapacitySchedulerQueueInfo.java
> - PartitionQueueCapacitiesInfo.java
> The proposed format in the design doc (YARN-10888):
> {code:json}
> {
> "capacityVector": {
> "memory-mb": "30%",
> "vcores": "16"
> }
> }
> {code}
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" ?>
> <capacityVector>
> <memory-mb>30%</memory-mb>
> <vcores>16</vcores>
> </capacityVector>
> {code}
> Unfortunately the current jsonProvider (MoxyJsonFeature or JettisonFeature
> not sure) serialise map structures in the following way:
> {code:json}
> {
> "capacityVector":{
> "entry":[
> {
> "key":"memory-mb",
> "value":"12288"
> },
> {
> "key":"vcores",
> "value":"86%"
> }
> ]
> }
> }
> {code}
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <capacityVector>
> <entry>
> <key>memory-mb</key>
> <value>1288</value>
> </entry>
> <entry>
> <key>vcores</key>
> <value>12</value>
> </entry>
> </capacityVector>
> {code}
> Based on some research with the following two dependencies we could achieve
> the proposed format:
> - jersey-media-json-jackson (this one is used in the apps catalog already)
> - jackson-dataformat-xml
> Some concerns:
> - 2 more dependencies
> - for the XML when the content depends on the runtime content of the map is
> not XSD friendly
> - name is capacityVector but it's represented in a map
> An alternative could be to just store the capacityVector as a string, but
> then clients needs to parse it, and it's not particularly nice either:
> {code:json}
> {
> "capacityVector": "[\"memory-mb\": 12288, \"vcores\": 86%]"
> }
> {code}
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" ?>
> <capacityVector>["memory-mb": 12288, "vcores":
> 86%]</capacityVector>
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]