diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/resources/resource-types/resource-types-error-redefine-fpga-unit.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/resources/resource-types/resource-types-error-redefine-fpga-unit.xml
new file mode 100644
index 0000000000..72cfb9888a
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/resources/resource-types/resource-types-error-redefine-fpga-unit.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+ yarn.resource-types
+ yarn.io/fpga
+
+
+
+ yarn.resource-types.yarn.io/fpga.units
+ G
+
+
+
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/resources/resource-types/resource-types-error-redefine-gpu-unit.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/resources/resource-types/resource-types-error-redefine-gpu-unit.xml
new file mode 100644
index 0000000000..aa61b5f40b
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/test/resources/resource-types/resource-types-error-redefine-gpu-unit.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+ yarn.resource-types
+ yarn.io/gpu
+
+
+
+ yarn.resource-types.yarn.io/gpu.units
+ G
+
+
+
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuDiscoverer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuDiscoverer.java
index b52d767c61..986f84a48f 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuDiscoverer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/resourceplugin/gpu/GpuDiscoverer.java
@@ -64,7 +64,6 @@ public class GpuDiscoverer {
private Configuration conf = null;
private String pathOfGpuBinary = null;
private Map environment = new HashMap<>();
- private GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
private int numOfErrorExecutionSinceLastSucceed = 0;
private GpuDeviceInformation lastDiscoveredGpuInformation = null;
@@ -125,6 +124,7 @@ synchronized GpuDeviceInformation getGpuDeviceInformation()
try {
output = Shell.execCommand(environment,
new String[] { pathOfGpuBinary, "-x", "-q" }, MAX_EXEC_TIMEOUT_MS);
+ GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
lastDiscoveredGpuInformation = parser.parseXml(output);
numOfErrorExecutionSinceLastSucceed = 0;
return lastDiscoveredGpuInformation;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformation.java
index 837d5cc99c..c830d432a6 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformation.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformation.java
@@ -21,6 +21,7 @@
import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.classification.InterfaceStability;
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
@@ -31,14 +32,10 @@
@InterfaceStability.Unstable
@XmlRootElement(name = "nvidia_smi_log")
public class GpuDeviceInformation {
- List gpus;
+ private List gpus;
+ private String driverVersion = "N/A";
- String driverVersion = "N/A";
-
- // More fields like topology information could be added when needed.
- // ...
-
- @javax.xml.bind.annotation.XmlElement(name = "gpu")
+ @XmlElement(name = "gpu")
public List getGpus() {
return gpus;
}
@@ -47,7 +44,7 @@ public void setGpus(List gpus) {
this.gpus = gpus;
}
- @javax.xml.bind.annotation.XmlElement(name = "driver_version")
+ @XmlElement(name = "driver_version")
public String getDriverVersion() {
return driverVersion;
}
@@ -59,8 +56,9 @@ public void setDriverVersion(String driverVersion) {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("=== Gpus in the system ===\n").append("\tDriver Version:").append(
- getDriverVersion()).append("\n");
+ sb.append("=== GPUs in the system ===\n")
+ .append("\tDriver Version:")
+ .append(getDriverVersion()).append("\n");
if (gpus != null) {
for (PerGpuDeviceInformation gpu : gpus) {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformationParser.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformationParser.java
index 894cb70ca6..5c166571cc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformationParser.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/GpuDeviceInformationParser.java
@@ -24,13 +24,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
-import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.sax.SAXSource;
import java.io.StringReader;
@@ -46,39 +44,39 @@ public class GpuDeviceInformationParser {
public static final String GPU_SCRIPT_REFERENCE = "GPU device detection " +
"script";
- private Unmarshaller unmarshaller = null;
- private XMLReader xmlReader = null;
+ private final Unmarshaller unmarshaller;
+ private final XMLReader xmlReader;
- private void init()
- throws SAXException, ParserConfigurationException, JAXBException {
+ public GpuDeviceInformationParser() throws YarnException {
+ try {
+ final SAXParserFactory parserFactory = initSaxParserFactory();
+ final JAXBContext jaxbContext = JAXBContext.newInstance(
+ GpuDeviceInformation.class);
+ this.xmlReader = parserFactory.newSAXParser().getXMLReader();
+ this.unmarshaller = jaxbContext.createUnmarshaller();
+ } catch (Exception e) {
+ String msg = "Exception while initializing parser for " +
+ GPU_SCRIPT_REFERENCE;
+ LOG.error(msg, e);
+ throw new YarnException(msg, e);
+ }
+ }
+
+ /**
+ * Disable external-dtd since by default nvidia-smi output contains
+ * <!DOCTYPE nvidia_smi_log SYSTEM "nvsmi_device_v8.dtd"> in header.
+ */
+ private SAXParserFactory initSaxParserFactory() throws Exception {
SAXParserFactory spf = SAXParserFactory.newInstance();
- // Disable external-dtd since by default nvidia-smi output contains
- // in header
spf.setFeature(
"http://apache.org/xml/features/nonvalidating/load-external-dtd",
false);
spf.setFeature("http://xml.org/sax/features/validation", false);
-
- JAXBContext jaxbContext = JAXBContext.newInstance(
- GpuDeviceInformation.class);
-
- this.xmlReader = spf.newSAXParser().getXMLReader();
- this.unmarshaller = jaxbContext.createUnmarshaller();
+ return spf;
}
public synchronized GpuDeviceInformation parseXml(String xmlContent)
throws YarnException {
- if (unmarshaller == null) {
- try {
- init();
- } catch (SAXException | ParserConfigurationException | JAXBException e) {
- String msg = "Exception while initializing parser for " +
- GPU_SCRIPT_REFERENCE;
- LOG.error(msg, e);
- throw new YarnException(e);
- }
- }
-
InputSource inputSource = new InputSource(new StringReader(xmlContent));
SAXSource source = new SAXSource(xmlReader, inputSource);
try {
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuDeviceInformation.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuDeviceInformation.java
index 25c2e3a1f1..11ff2a4c49 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuDeviceInformation.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuDeviceInformation.java
@@ -33,7 +33,6 @@
@InterfaceStability.Unstable
@XmlRootElement(name = "gpu")
public class PerGpuDeviceInformation {
-
private String productName = "N/A";
private String uuid = "N/A";
private int minorNumber = -1;
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuMemoryUsage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuMemoryUsage.java
index afc1a9679b..1c2c0c49b8 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuMemoryUsage.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/PerGpuMemoryUsage.java
@@ -29,8 +29,8 @@
@InterfaceStability.Unstable
@XmlRootElement(name = "fb_memory_usage")
public class PerGpuMemoryUsage {
- long usedMemoryMiB = -1L;
- long availMemoryMiB = -1L;
+ private long usedMemoryMiB = -1L;
+ private long availMemoryMiB = -1L;
@XmlJavaTypeAdapter(PerGpuDeviceInformation.StrToMemAdapter.class)
@XmlElement(name = "used")
@@ -53,6 +53,9 @@ public void setAvailMemoryMiB(Long availMemoryMiB) {
}
public long getTotalMemoryMiB() {
+ if (usedMemoryMiB == -1 && availMemoryMiB == -1) {
+ return -1;
+ }
return usedMemoryMiB + availMemoryMiB;
}
}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/TestGpuDeviceInformationParser.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/TestGpuDeviceInformationParser.java
index dc96746cf5..28e06b72bc 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/TestGpuDeviceInformationParser.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/dao/gpu/TestGpuDeviceInformationParser.java
@@ -20,31 +20,160 @@
import org.apache.commons.io.FileUtils;
import org.apache.hadoop.yarn.exceptions.YarnException;
-import org.junit.Assert;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
import java.io.File;
import java.io.IOException;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
public class TestGpuDeviceInformationParser {
+ private static final String UTF_8 = "UTF-8";
+ private static final double DELTA = 1e-6;
+
+ @Rule
+ public ExpectedException expected = ExpectedException.none();
+
@Test
public void testParse() throws IOException, YarnException {
- File f = new File("src/test/resources/nvidia-smi-sample-xml-output");
- String s = FileUtils.readFileToString(f, "UTF-8");
+ File f = new File("src/test/resources/nvidia-smi-sample-output.xml");
+ String s = FileUtils.readFileToString(f, UTF_8);
GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
-
GpuDeviceInformation info = parser.parseXml(s);
- Assert.assertEquals("375.66", info.getDriverVersion());
- Assert.assertEquals(2, info.getGpus().size());
- PerGpuDeviceInformation gpu1 = info.getGpus().get(1);
- Assert.assertEquals("Tesla P100-PCIE-12GB", gpu1.getProductName());
- Assert.assertEquals(12193, gpu1.getGpuMemoryUsage().getTotalMemoryMiB());
- Assert.assertEquals(10.3f,
- gpu1.getGpuUtilizations().getOverallGpuUtilization(), 1e-6);
- Assert.assertEquals(34f, gpu1.getTemperature().getCurrentGpuTemp(), 1e-6);
- Assert.assertEquals(85f, gpu1.getTemperature().getMaxGpuTemp(), 1e-6);
- Assert.assertEquals(82f, gpu1.getTemperature().getSlowThresholdGpuTemp(),
- 1e-6);
+
+ assertEquals("375.66", info.getDriverVersion());
+ assertEquals(2, info.getGpus().size());
+ assertFirstGpu(info.getGpus().get(0));
+ assertSecondGpu(info.getGpus().get(1));
+ }
+
+ @Test
+ public void testParseExcerpt() throws IOException, YarnException {
+ File f = new File("src/test/resources/nvidia-smi-output-excerpt.xml");
+ String s = FileUtils.readFileToString(f, UTF_8);
+
+ GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
+ GpuDeviceInformation info = parser.parseXml(s);
+
+ assertEquals("375.66", info.getDriverVersion());
+ assertEquals(2, info.getGpus().size());
+ assertFirstGpu(info.getGpus().get(0));
+ assertSecondGpu(info.getGpus().get(1));
+ }
+
+ @Test
+ public void testParseConsecutivelyWithSameParser()
+ throws IOException, YarnException {
+ File f = new File("src/test/resources/nvidia-smi-sample-output.xml");
+ String s = FileUtils.readFileToString(f, UTF_8);
+
+ for (int i = 0; i < 3; i++) {
+ GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
+ GpuDeviceInformation info = parser.parseXml(s);
+
+ assertEquals("375.66", info.getDriverVersion());
+ assertEquals(2, info.getGpus().size());
+ assertFirstGpu(info.getGpus().get(0));
+ assertSecondGpu(info.getGpus().get(1));
+ }
+ }
+
+ @Test
+ public void testParseEmptyString() throws YarnException {
+ expected.expect(YarnException.class);
+ GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
+ parser.parseXml("");
+ }
+
+ @Test
+ public void testParseInvalidRootElement() throws YarnException {
+ expected.expect(YarnException.class);
+ GpuDeviceInformationParser parser = new GpuDeviceInformationParser();
+ parser.parseXml("
+
+
+
+
+
+ Wed Sep 6 21:52:51 2017
+ 375.66
+ 2
+
+ Tesla P100-PCIE-12GB
+ Tesla
+ GPU-28604e81-21ec-cc48-6759-bf2648b22e16
+ 0
+
+ 11567 MiB
+ 11400 MiB
+ 167 MiB
+
+
+ 33.4 %
+ 0 %
+ 0 %
+ 0 %
+
+
+ 31 C
+ 80 C
+ 88 C
+
+
+
+
+ Tesla P100-PCIE-12GB_2
+ Tesla
+ GPU-46915a82-3fd2-8e11-ae26-a80b607c04f3
+ 1
+
+ 12290 MiB
+ 11800 MiB
+ 490 MiB
+
+ Default
+
+ 10.3 %
+ 0 %
+ 0 %
+ 0 %
+
+
+ 34 C
+ 85 C
+ 82 C
+
+
+
+
\ No newline at end of file
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-output-missing-tags.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-output-missing-tags.xml
new file mode 100644
index 0000000000..df341d36a1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-output-missing-tags.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ Wed Sep 6 21:52:51 2017
+ 375.66
+ 2
+
+ Tesla
+
+
+
\ No newline at end of file
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-output-missing-tags2.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-output-missing-tags2.xml
new file mode 100644
index 0000000000..add92a83d7
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-output-missing-tags2.xml
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+ Wed Sep 6 21:52:51 2017
+ 375.66
+ 2
+
+ Tesla P100-PCIE-12GB
+ Tesla
+ GPU-28604e81-21ec-cc48-6759-bf2648b22e16
+ 0
+
+
+
+
+
+
+
+
+
+ Tesla P100-PCIE-12GB_2
+ Tesla
+ GPU-46915a82-3fd2-8e11-ae26-a80b607c04f3
+ 1
+
+ 12290 MiB
+ 11800 MiB
+ 490 MiB
+
+ Default
+
+ 10.3 %
+ 0 %
+ 0 %
+ 0 %
+
+
+ 34 C
+ 85 C
+ 82 C
+
+
+
+
\ No newline at end of file
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-sample-output.xml b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-sample-output.xml
new file mode 100644
index 0000000000..cdd5404ea9
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-sample-output.xml
@@ -0,0 +1,547 @@
+
+
+
+
+
+
+ Wed Sep 6 21:52:51 2017
+ 375.66
+ 2
+
+ Tesla P100-PCIE-12GB
+ Tesla
+ Disabled
+ Disabled
+ Disabled
+ Disabled
+ 1920
+
+ N/A
+ N/A
+
+ 0320717030197
+ GPU-28604e81-21ec-cc48-6759-bf2648b22e16
+ 0
+ 86.00.3A.00.02
+ No
+ 0x400
+ 900-2H400-0110-030
+
+ H400.0202.00.01
+ 1.1
+ 4.1
+ N/A
+
+
+ N/A
+ N/A
+
+
+ None
+
+
+ 04
+ 00
+ 0000
+ 15F710DE
+ 0000:04:00.0
+ 11DA10DE
+
+
+ 3
+ 3
+
+
+ 16x
+ 16x
+
+
+
+ N/A
+ N/A
+
+ 0
+ 0 KB/s
+ 0 KB/s
+
+ N/A
+ P0
+
+ Active
+ Not Active
+ Not Active
+ Not Active
+ Not Active
+ Not Active
+
+
+ 11567 MiB
+ 11400 MiB
+ 167 MiB
+
+
+ 16384 MiB
+ 2 MiB
+ 16382 MiB
+
+ Default
+
+ 33.4 %
+ 0 %
+ 0 %
+ 0 %
+
+
+ 0
+ 0
+ 0 ms
+
+
+ Enabled
+ Enabled
+
+
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+
+
+ No
+
+
+ 31 C
+ 80 C
+ 88 C
+
+
+ P0
+ Supported
+ 24.84 W
+ 250.00 W
+ 250.00 W
+ 250.00 W
+ 125.00 W
+ 250.00 W
+
+
+ 405 MHz
+ 405 MHz
+ 715 MHz
+ 835 MHz
+
+
+ 1189 MHz
+ 715 MHz
+
+
+ 1189 MHz
+ 715 MHz
+
+
+ 1328 MHz
+ 1328 MHz
+ 715 MHz
+ 1328 MHz
+
+
+ N/A
+ N/A
+
+
+
+ 715 MHz
+ 1328 MHz
+ 1316 MHz
+ 1303 MHz
+ 1290 MHz
+ 1278 MHz
+ 1265 MHz
+ 1252 MHz
+ 1240 MHz
+ 1227 MHz
+ 1215 MHz
+ 1202 MHz
+ 1189 MHz
+ 1177 MHz
+ 1164 MHz
+ 1151 MHz
+ 1139 MHz
+ 1126 MHz
+ 1113 MHz
+ 1101 MHz
+ 1088 MHz
+ 1075 MHz
+ 1063 MHz
+ 1050 MHz
+ 1037 MHz
+ 1025 MHz
+ 1012 MHz
+ 999 MHz
+ 987 MHz
+ 974 MHz
+ 961 MHz
+ 949 MHz
+ 936 MHz
+ 923 MHz
+ 911 MHz
+ 898 MHz
+ 885 MHz
+ 873 MHz
+ 860 MHz
+ 847 MHz
+ 835 MHz
+ 822 MHz
+ 810 MHz
+ 797 MHz
+ 784 MHz
+ 772 MHz
+ 759 MHz
+ 746 MHz
+ 734 MHz
+ 721 MHz
+ 708 MHz
+ 696 MHz
+ 683 MHz
+ 670 MHz
+ 658 MHz
+ 645 MHz
+ 632 MHz
+ 620 MHz
+ 607 MHz
+ 594 MHz
+ 582 MHz
+ 569 MHz
+ 556 MHz
+ 544 MHz
+
+
+
+
+
+
+
+
+
+ Tesla P100-PCIE-12GB_2
+ Tesla
+ Disabled
+ Disabled
+ Disabled
+ Disabled
+ 1920
+
+ N/A
+ N/A
+
+ 0320717031755
+ GPU-46915a82-3fd2-8e11-ae26-a80b607c04f3
+ 1
+ 86.00.3A.00.02
+ No
+ 0x8200
+ 900-2H400-0110-030
+
+ H400.0202.00.01
+ 1.1
+ 4.1
+ N/A
+
+
+ N/A
+ N/A
+
+
+ None
+
+
+ 82
+ 00
+ 0000
+ 15F710DE
+ 0000:82:00.0
+ 11DA10DE
+
+
+ 3
+ 3
+
+
+ 16x
+ 16x
+
+
+
+ N/A
+ N/A
+
+ 0
+ 0 KB/s
+ 0 KB/s
+
+ N/A
+ P0
+
+ Active
+ Not Active
+ Not Active
+ Not Active
+ Not Active
+ Not Active
+
+
+ 12290 MiB
+ 11800 MiB
+ 490 MiB
+
+
+ 16384 MiB
+ 2 MiB
+ 16382 MiB
+
+ Default
+
+ 10.3 %
+ 0 %
+ 0 %
+ 0 %
+
+
+ 0
+ 0
+ 0 ms
+
+
+ Enabled
+ Enabled
+
+
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ N/A
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+ 0
+
+
+
+
+ 0
+
+
+
+ No
+
+
+ 34 C
+ 85 C
+ 82 C
+
+
+ P0
+ Supported
+ 25.54 W
+ 250.00 W
+ 250.00 W
+ 250.00 W
+ 125.00 W
+ 250.00 W
+
+
+ 405 MHz
+ 405 MHz
+ 715 MHz
+ 835 MHz
+
+
+ 1189 MHz
+ 715 MHz
+
+
+ 1189 MHz
+ 715 MHz
+
+
+ 1328 MHz
+ 1328 MHz
+ 715 MHz
+ 1328 MHz
+
+
+ N/A
+ N/A
+
+
+
+ 715 MHz
+ 1328 MHz
+ 1316 MHz
+ 1303 MHz
+ 1290 MHz
+ 1278 MHz
+ 1265 MHz
+ 1252 MHz
+ 1240 MHz
+ 1227 MHz
+ 1215 MHz
+ 1202 MHz
+ 1189 MHz
+ 1177 MHz
+ 1164 MHz
+ 1151 MHz
+ 1139 MHz
+ 1126 MHz
+ 1113 MHz
+ 1101 MHz
+ 1088 MHz
+ 1075 MHz
+ 1063 MHz
+ 1050 MHz
+ 1037 MHz
+ 1025 MHz
+ 1012 MHz
+ 999 MHz
+ 987 MHz
+ 974 MHz
+ 961 MHz
+ 949 MHz
+ 936 MHz
+ 923 MHz
+ 911 MHz
+ 898 MHz
+ 885 MHz
+ 873 MHz
+ 860 MHz
+ 847 MHz
+ 835 MHz
+ 822 MHz
+ 810 MHz
+ 797 MHz
+ 784 MHz
+ 772 MHz
+ 759 MHz
+ 746 MHz
+ 734 MHz
+ 721 MHz
+ 708 MHz
+ 696 MHz
+ 683 MHz
+ 670 MHz
+ 658 MHz
+ 645 MHz
+ 632 MHz
+ 620 MHz
+ 607 MHz
+ 594 MHz
+ 582 MHz
+ 569 MHz
+ 556 MHz
+ 544 MHz
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-sample-xml-output b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-sample-xml-output
deleted file mode 100644
index 5ccb72265b..0000000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/resources/nvidia-smi-sample-xml-output
+++ /dev/null
@@ -1,547 +0,0 @@
-
-
-
-
-
-
- Wed Sep 6 21:52:51 2017
- 375.66
- 2
-
- Tesla P100-PCIE-12GB
- Tesla
- Disabled
- Disabled
- Disabled
- Disabled
- 1920
-
- N/A
- N/A
-
- 0320717030197
- GPU-28604e81-21ec-cc48-6759-bf2648b22e16
- 0
- 86.00.3A.00.02
- No
- 0x400
- 900-2H400-0110-030
-
- H400.0202.00.01
- 1.1
- 4.1
- N/A
-
-
- N/A
- N/A
-
-
- None
-
-
- 04
- 00
- 0000
- 15F710DE
- 0000:04:00.0
- 11DA10DE
-
-
- 3
- 3
-
-
- 16x
- 16x
-
-
-
- N/A
- N/A
-
- 0
- 0 KB/s
- 0 KB/s
-
- N/A
- P0
-
- Active
- Not Active
- Not Active
- Not Active
- Not Active
- Not Active
-
-
- 12193 MiB
- 0 MiB
- 12193 MiB
-
-
- 16384 MiB
- 2 MiB
- 16382 MiB
-
- Default
-
- 0 %
- 0 %
- 0 %
- 0 %
-
-
- 0
- 0
- 0 ms
-
-
- Enabled
- Enabled
-
-
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
- No
-
-
- 31 C
- 85 C
- 82 C
-
-
- P0
- Supported
- 24.84 W
- 250.00 W
- 250.00 W
- 250.00 W
- 125.00 W
- 250.00 W
-
-
- 405 MHz
- 405 MHz
- 715 MHz
- 835 MHz
-
-
- 1189 MHz
- 715 MHz
-
-
- 1189 MHz
- 715 MHz
-
-
- 1328 MHz
- 1328 MHz
- 715 MHz
- 1328 MHz
-
-
- N/A
- N/A
-
-
-
- 715 MHz
- 1328 MHz
- 1316 MHz
- 1303 MHz
- 1290 MHz
- 1278 MHz
- 1265 MHz
- 1252 MHz
- 1240 MHz
- 1227 MHz
- 1215 MHz
- 1202 MHz
- 1189 MHz
- 1177 MHz
- 1164 MHz
- 1151 MHz
- 1139 MHz
- 1126 MHz
- 1113 MHz
- 1101 MHz
- 1088 MHz
- 1075 MHz
- 1063 MHz
- 1050 MHz
- 1037 MHz
- 1025 MHz
- 1012 MHz
- 999 MHz
- 987 MHz
- 974 MHz
- 961 MHz
- 949 MHz
- 936 MHz
- 923 MHz
- 911 MHz
- 898 MHz
- 885 MHz
- 873 MHz
- 860 MHz
- 847 MHz
- 835 MHz
- 822 MHz
- 810 MHz
- 797 MHz
- 784 MHz
- 772 MHz
- 759 MHz
- 746 MHz
- 734 MHz
- 721 MHz
- 708 MHz
- 696 MHz
- 683 MHz
- 670 MHz
- 658 MHz
- 645 MHz
- 632 MHz
- 620 MHz
- 607 MHz
- 594 MHz
- 582 MHz
- 569 MHz
- 556 MHz
- 544 MHz
-
-
-
-
-
-
-
-
-
- Tesla P100-PCIE-12GB
- Tesla
- Disabled
- Disabled
- Disabled
- Disabled
- 1920
-
- N/A
- N/A
-
- 0320717031755
- GPU-46915a82-3fd2-8e11-ae26-a80b607c04f3
- 1
- 86.00.3A.00.02
- No
- 0x8200
- 900-2H400-0110-030
-
- H400.0202.00.01
- 1.1
- 4.1
- N/A
-
-
- N/A
- N/A
-
-
- None
-
-
- 82
- 00
- 0000
- 15F710DE
- 0000:82:00.0
- 11DA10DE
-
-
- 3
- 3
-
-
- 16x
- 16x
-
-
-
- N/A
- N/A
-
- 0
- 0 KB/s
- 0 KB/s
-
- N/A
- P0
-
- Active
- Not Active
- Not Active
- Not Active
- Not Active
- Not Active
-
-
- 12193 MiB
- 0 MiB
- 12193 MiB
-
-
- 16384 MiB
- 2 MiB
- 16382 MiB
-
- Default
-
- 10.3 %
- 0 %
- 0 %
- 0 %
-
-
- 0
- 0
- 0 ms
-
-
- Enabled
- Enabled
-
-
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
- 0
- 0
- N/A
- 0
- 0
- 0
- 0
-
-
-
-
-
- 0
-
-
-
-
- 0
-
-
-
- No
-
-
- 34 C
- 85 C
- 82 C
-
-
- P0
- Supported
- 25.54 W
- 250.00 W
- 250.00 W
- 250.00 W
- 125.00 W
- 250.00 W
-
-
- 405 MHz
- 405 MHz
- 715 MHz
- 835 MHz
-
-
- 1189 MHz
- 715 MHz
-
-
- 1189 MHz
- 715 MHz
-
-
- 1328 MHz
- 1328 MHz
- 715 MHz
- 1328 MHz
-
-
- N/A
- N/A
-
-
-
- 715 MHz
- 1328 MHz
- 1316 MHz
- 1303 MHz
- 1290 MHz
- 1278 MHz
- 1265 MHz
- 1252 MHz
- 1240 MHz
- 1227 MHz
- 1215 MHz
- 1202 MHz
- 1189 MHz
- 1177 MHz
- 1164 MHz
- 1151 MHz
- 1139 MHz
- 1126 MHz
- 1113 MHz
- 1101 MHz
- 1088 MHz
- 1075 MHz
- 1063 MHz
- 1050 MHz
- 1037 MHz
- 1025 MHz
- 1012 MHz
- 999 MHz
- 987 MHz
- 974 MHz
- 961 MHz
- 949 MHz
- 936 MHz
- 923 MHz
- 911 MHz
- 898 MHz
- 885 MHz
- 873 MHz
- 860 MHz
- 847 MHz
- 835 MHz
- 822 MHz
- 810 MHz
- 797 MHz
- 784 MHz
- 772 MHz
- 759 MHz
- 746 MHz
- 734 MHz
- 721 MHz
- 708 MHz
- 696 MHz
- 683 MHz
- 670 MHz
- 658 MHz
- 645 MHz
- 632 MHz
- 620 MHz
- 607 MHz
- 594 MHz
- 582 MHz
- 569 MHz
- 556 MHz
- 544 MHz
-
-
-
-
-
-
-
-
-
\ No newline at end of file