K0K0V0K commented on code in PR #8227:
URL: https://github.com/apache/hadoop/pull/8227#discussion_r2842966790


##########
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:
   > No changes needed here, I will revert all changes here. All the unit-test 
pass without it but will check on the endpoints too.
   
   So if i understand you correctly that is not a possible scenario that user 
create an own 
   `org.my.company.strange-resource-plugin`
   what will use some strange resource, and if 
   
   ```
   <property>
   <name>yarn.nodemanager.pluggable-device-framework.device-classes</name>
   <value>org.my.company.strange-resource-plugin</value>
   </property>
   ```
   
   than the /resources/{resourcename} would try to return with a 
   
   ```
   public class StrangeResourceInfo extends NMResourceInfo {
   ...
   }
   ```
   
   but that message body writer is not present on the jersey context, so 
exception will be thrown, 
   or some similar config required here, like 
`yarn.http.rmwebapp.custom.dao.classes`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to