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

ASF GitHub Bot commented on YARN-11897:
---------------------------------------

Hean-Chhinling commented on code in PR #8227:
URL: https://github.com/apache/hadoop/pull/8227#discussion_r2847610741


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/NMResourceInfo.java:
##########
@@ -18,24 +18,15 @@
 
 package org.apache.hadoop.yarn.server.nodemanager.webapp.dao;
 
+import 
org.apache.hadoop.yarn.server.nodemanager.webapp.dao.gpu.NMGpuResourceInfo;
+
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSeeAlso;
 
 @XmlRootElement
 @XmlAccessorType(XmlAccessType.FIELD)
+@XmlSeeAlso({NMGpuResourceInfo.class, NMDeviceResourceInfo.class})
 public class NMResourceInfo {
-
-  private long resourceValue;

Review Comment:
   I am started to think that it is not necessary to check this endpoint as I 
am going to revert back to the older 
[commit](https://github.com/apache/hadoop/pull/7019) from previously update to 
Jersey2.
   
   And the difference between Jersey1 and Jersey2 in the unit-test response is 
an additional `resourceValue` field.
   
   But let me if the effort needed to configure all this plugin as it seems 
specific cluster and more than one configuration to be able to test 
/resource/{resourcename}.
   
   





> NodeManager REST API backward compatibility with Jersey1
> --------------------------------------------------------
>
>                 Key: YARN-11897
>                 URL: https://issues.apache.org/jira/browse/YARN-11897
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: yarn
>    Affects Versions: 3.5.0
>            Reporter: Peter Szucs
>            Assignee: chhinlinghean
>            Priority: Major
>              Labels: pull-request-available
>
> Jersey 2 upgrade broke NM REST API, so nodes applications page is not 
> rendering in yarn UI v2 and also logs CLI cannot retrieve container logs.
> To fix this we need to:
>  * introduce moxy in NM similar to YARN-11874
>  * "/containers/\{containerid}/logs" endpoint returns a list, which will 
> always be generated as a JSON array with Jersey 2. In Jersey 1 it returned a 
> JSON object in case the list had a single element, and logs CLI expects a 
> JSON object as well when calling this endpoint. That should be changed to 
> keep backward compatibility. With returning a wrapper object instead of a 
> list we could achieve the same behaviour.
>  * Fix unit tests



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to