[
https://issues.apache.org/jira/browse/YARN-11874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18030805#comment-18030805
]
ASF GitHub Bot commented on YARN-11874:
---------------------------------------
K0K0V0K commented on code in PR #8033:
URL: https://github.com/apache/hadoop/pull/8033#discussion_r2441845819
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/dao/NodeLabelsInfo.java:
##########
@@ -48,7 +48,7 @@ public NodeLabelsInfo(List<NodeLabel> nodeLabels) {
this.nodeLabelsInfo.add(new NodeLabelInfo(label));
}
}
-
+
Review Comment:
Hey @Hean-Chhinling !
Thanks for the review!
If is see well in the previous version there was an unintentional space what
will be deleted with this commit, but please correct me if i am wrong.
> ResourceManager REST api scheduler info contains @xsi.type instead of type
> --------------------------------------------------------------------------
>
> Key: YARN-11874
> URL: https://issues.apache.org/jira/browse/YARN-11874
> Project: Hadoop YARN
> Issue Type: Bug
> Components: yarn
> Affects Versions: 3.5.0
> Reporter: Bence Kosztolnik
> Assignee: Bence Kosztolnik
> Priority: Major
> Labels: pull-request-available
>
> *Problem statement:*
> The /ws/v1/cluster/scheduler returns with invalid response
> {code:java}
> {
> "scheduler": {
> "schedulerInfo": {
> "@xsi.type":"fifoScheduler",
> "capacity":1,
> ...
> {code}
> instead of this:
> {code:java}
> {
> "scheduler": {
> "schedulerInfo": {
> "type":"fifoScheduler",
> "capacity":1,
> ...
> {code}
> source:
> https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html#Cluster_Scheduler_API
> *Repro:*
> 1) Modify the TestRMWebServices#verifyClusterSchedulerFifo and add the line
> {code:java}
> assertTrue(info.has("type"), "incorrect type of element: " + info);
> {code}
> 2) Run the testClusterSchedulerFifo test, it will fail
> *Possible root cause:*
> I think during the jersey2 upgrade when
> *org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver*
> was modified with replacement of *com.sun.jersey.api.json.JSONJAXBContext* to
> *org.glassfish.jersey.jettison.JettisonJaxbContext* we changed the
> behaviourment how we convert the XML models to JSON in the REST API.
> https://github.com/apache/hadoop/blob/06d36f5a6a1a01d159bef75b22ca2845e8c90bad/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/JAXBContextResolver.java#L158
> *Other failures:*
> When we generate a UI list with only one element it will be converted to json
> object instead of list with single element.
> For example the doc says
> {noformat}
> queues array of queues(JSON)/zero or more queue objects(XML)
> {noformat}
> in context of schedulerInfo object, but if we have just one queue it wont be
> an array, just a simple queue object.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]