Hean-Chhinling commented on code in PR #8227:
URL: https://github.com/apache/hadoop/pull/8227#discussion_r2841364369
##########
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:
Well, it turns out that this `@XmlSeeAlso({NMGpuResourceInfo.class,
NMDeviceResourceInfo.class})` is not needed at all. It was previously because
of the following:
`@XmlSeeAlso({NMGpuResourceInfo.class}) is added in NMResourceInfo to make
testGetYarnGpuResourceInfo pass without it the mocking method for the test
return only the parent (NMResourceInfo) and not the child (NMGpuResourceInfo).`
but when I tried to discovered the error without @XmlSeeAlso, it did not
happens at all so I believe we could remove it.
--
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]