diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs
index d2486c9ff6f..fffae30ab30 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/node-menu-panel.hbs
@@ -24,8 +24,8 @@
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-nm-gpu-info.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-nm-gpu-info.hbs
new file mode 100644
index 00000000000..4118b1e7c81
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/components/yarn-nm-gpu-info.hbs
@@ -0,0 +1,69 @@
+{{!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+}}
+
+
+
Gpu Information - (Minor
+ Number {{gpu.minorNumber}})
+
+
+
+
+ | Product Name |
+ {{gpu.productName}} |
+
+
+ | UUID |
+ {{gpu.uuid}} |
+
+
+ | Current Temperature |
+ {{gpu.temperature.currentGpuTemp}} |
+
+
+ | Max Temperature |
+ {{gpu.temperature.maxGpuTemp}} |
+
+
+
+
+
+ {{gpu-donut-chart gpuInfo=gpu
+ showLabels=true
+ parentId="mem-donut-chart"
+ middleLabel = "Gpu Memory"
+ ratio=0.6
+ type="memory"
+ gpu-render-type = "gpu-memory"
+ colorTargets="good"
+ colorTargetReverse=true
+ maxHeight=350}}
+
+
+
+ {{gpu-donut-chart gpuInfo=gpu
+ showLabels=true
+ parentId="utilization-donut-chart"
+ middleLabel = "Gpu Utilization"
+ ratio=0.6
+ gpu-render-type = "gpu-utilization"
+ colorTargets="good"
+ colorTargetReverse=true
+ suffix="%"
+ maxHeight=350}}
+
+
\ No newline at end of file
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
deleted file mode 100644
index 1e8549bd87f..00000000000
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node.hbs
+++ /dev/null
@@ -1,125 +0,0 @@
-{{!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
---}}
-
-{{breadcrumb-bar breadcrumbs=breadcrumbs}}
-
-
-
-
- {{node-menu-panel path="yarn-node" nodeId=model.rmNode.id nodeAddr=model.node.id}}
-
-
-
-
-
-
-
Node Information: {{model.rmNode.id}}
-
-
-
- | Total Vmem allocated for Containers |
- {{divide num=model.node.totalVmemAllocatedContainersMB den=1024}} GB |
-
-
- | Vmem enforcement enabled |
- {{model.node.vmemCheckEnabled}} |
-
-
- | Total Pmem allocated for Containers |
- {{divide num=model.node.totalPmemAllocatedContainersMB den=1024}} GB |
-
-
- | Pmem enforcement enabled |
- {{model.node.pmemCheckEnabled}} |
-
-
- | Total VCores allocated for Containers |
- {{model.node.totalVCoresAllocatedContainers}} |
-
-
- | Node Healthy Status |
- {{model.node.nodeHealthy}} |
-
-
- | Last Node Health Report Time |
- {{model.node.lastNodeUpdateTime}} |
-
-
- | Node Health Report |
- {{model.node.healthReport}} |
-
- {{#if model.node.nmStartupTime}}
-
- | Node Manager Start Time |
- {{model.node.nmStartupTime}} |
-
- {{/if}}
-
- | Node Manager Version |
- {{model.node.nodeManagerBuildVersion}} |
-
-
- | Hadoop Version |
- {{model.node.hadoopBuildVersion}} |
-
-
-
-
-
-
-
-
-
-
-
- Resource - Memory
-
-
- {{donut-chart data=model.rmNode.getMemoryDataForDonutChart
- showLabels=true
- parentId="mem-donut-chart"
- ratio=0.6
- type="memory"
- colorTargets="good"
- colorTargetReverse=true
- maxHeight=350}}
-
-
-
-
-
-
-
- Resource - VCores
-
-
- {{donut-chart data=model.rmNode.getVCoreDataForDonutChart
- showLabels=true
- parentId="vcore-donut-chart"
- ratio=0.6
- colorTargets="good"
- colorTargetReverse=true
- maxHeight=350}}
-
-
-
-
-
-
-
-{{outlet}}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node/info.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node/info.hbs
new file mode 100644
index 00000000000..ad411c096a1
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node/info.hbs
@@ -0,0 +1,154 @@
+{{!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--}}
+
+{{breadcrumb-bar breadcrumbs=breadcrumbs}}
+
+
+
+
+ {{node-menu-panel path="yarn-node" nodeId=model.rmNode.id
+ nodeAddr=model.node.id nmGpuInfo=model.nmGpuInfo}}
+
+
+
+
+
+
+
Node
+ Information: {{model.rmNode.id}}
+
+
+
+ | Total Vmem allocated for Containers |
+ {{divide num=model.node.totalVmemAllocatedContainersMB
+ den=1024}} GB
+ |
+
+
+ | Vmem enforcement enabled |
+ {{model.node.vmemCheckEnabled}} |
+
+
+ | Total Pmem allocated for Containers |
+ {{divide num=model.node.totalPmemAllocatedContainersMB
+ den=1024}} GB
+ |
+
+
+ | Pmem enforcement enabled |
+ {{model.node.pmemCheckEnabled}} |
+
+
+ | Total VCores allocated for Containers |
+ {{model.node.totalVCoresAllocatedContainers}} |
+
+
+ | Node Healthy Status |
+ {{model.node.nodeHealthy}} |
+
+
+ | Last Node Health Report Time |
+ {{model.node.lastNodeUpdateTime}} |
+
+
+ | Node Health Report |
+ {{model.node.healthReport}} |
+
+ {{#if model.node.nmStartupTime}}
+
+ | Node Manager Start Time |
+ {{model.node.nmStartupTime}} |
+
+ {{/if}}
+
+ | Node Manager Version |
+ {{model.node.nodeManagerBuildVersion}} |
+
+
+ | Hadoop Version |
+ {{model.node.hadoopBuildVersion}} |
+
+
+
+
+
+
+
+
+
+
+
+ Resource - Memory
+
+
+ {{donut-chart data=model.rmNode.getMemoryDataForDonutChart
+ showLabels=true
+ parentId="mem-donut-chart"
+ ratio=0.6
+ type="memory"
+ colorTargets="good"
+ colorTargetReverse=true
+ maxHeight=350}}
+
+
+
+
+
+
+
+ Resource - VCores
+
+
+ {{donut-chart data=model.rmNode.getVCoreDataForDonutChart
+ showLabels=true
+ parentId="vcore-donut-chart"
+ ratio=0.6
+ colorTargets="good"
+ colorTargetReverse=true
+ maxHeight=350}}
+
+
+
+
+
+ {{#if model.nmGpuInfo}}
+
+
+
+
+
+ Resources - yarn.io/gpu
+
+
+
+ {{donut-chart data=model.rmNode.getGpuDataForDonutChart
+ showLabels=true
+ parentId="gpu-donut-chart"
+ ratio=0.6
+ colorTargets="good"
+ colorTargetReverse=true
+ maxHeight=350}}
+
+
+
+
+ {{/if}}
+
+
+
+{{outlet}}
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node/yarn-nm-gpu.hbs b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node/yarn-nm-gpu.hbs
new file mode 100644
index 00000000000..55840ade343
--- /dev/null
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/templates/yarn-node/yarn-nm-gpu.hbs
@@ -0,0 +1,53 @@
+{{!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--}}
+
+{{breadcrumb-bar breadcrumbs=breadcrumbs}}
+
+
+
+
+ {{node-menu-panel path="yarn-node" nodeId=model.rmNode.id
+ nodeAddr=model.node.id nmGpuInfo=model.nmGpuInfo}}
+
+
+
+
Gpu Information
+
+
+
+ | Vendor |
+ NVIDIA |
+
+
+ | Driver Version |
+ {{model.nmGpuInfo.info.gpuDeviceInformation.driverVersion}} |
+
+
+ | Total Number Of Gpus |
+ {{model.nmGpuInfo.info.totalGpuDevices.length}} |
+
+
+
+
+
+ {{#each model.nmGpuInfo.info.gpuDeviceInformation.gpus as |gpu|}}
+ {{yarn-nm-gpu-info gpu=gpu}}
+ {{/each}}
+
+
+
\ No newline at end of file
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js
index b9da222cceb..74cc9161d31 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-ui/src/main/webapp/app/utils/converter.js
@@ -130,6 +130,57 @@ export default {
}
return value.toFixed(1) + " " + unit;
},
+ resourceToSimplifiedUnit: function (value, unit) {
+ // First convert unit to base unit ("").
+ var normalizedValue = value;
+ if (unit === "Ki") {
+ normalizedValue = normalizedValue * 1024;
+ } else if (unit === "Mi") {
+ normalizedValue = normalizedValue * 1024 * 1024;
+ } else if (unit === "Gi") {
+ normalizedValue = normalizedValue * 1024 * 1024 * 1024;
+ } else if (unit === "Ti") {
+ normalizedValue = normalizedValue * 1024 * 1024 * 1024 * 1024;
+ } else if (unit === "Pi") {
+ normalizedValue = normalizedValue * 1024 * 1024 * 1024 * 1024 * 1024;
+ } else if (unit === "K" || unit === "k") {
+ normalizedValue = normalizedValue * 1000;
+ } else if (unit === "M" || unit === "m") {
+ normalizedValue = normalizedValue * 1000 * 1000;
+ } else if (unit === "G" || unit === "g") {
+ normalizedValue = normalizedValue * 1000 * 1000 * 1000;
+ } else if (unit === "T" || unit === "t") {
+ normalizedValue = normalizedValue * 1000 * 1000 * 1000 * 1000;
+ } else if (unit === "P" || unit === "p") {
+ normalizedValue = normalizedValue * 1000 * 1000 * 1000 * 1000 * 1000;
+ }
+
+ // From baseunit ("") convert to most human readable unit
+ // (which value < 1024 * 0.9).
+ var finalUnit = "";
+ if (normalizedValue / 1024 >= 0.9) {
+ normalizedValue = normalizedValue / 1024;
+ finalUnit = "Ki";
+ }
+ if (normalizedValue / 1024 >= 0.9) {
+ normalizedValue = normalizedValue / 1024;
+ finalUnit = "Mi";
+ }
+ if (normalizedValue / 1024 >= 0.9) {
+ normalizedValue = normalizedValue / 1024;
+ finalUnit = "Gi";
+ }
+ if (normalizedValue / 1024 >= 0.9) {
+ normalizedValue = normalizedValue / 1024;
+ finalUnit = "Ti";
+ }
+ if (normalizedValue / 1024 >= 0.9) {
+ normalizedValue = normalizedValue / 1024;
+ finalUnit = "Pi";
+ }
+
+ return normalizedValue.toFixed(1) + " " + finalUnit;
+ },
msToElapsedTimeUnit: function(millisecs, short) {
var seconds = Math.floor(millisecs / 1000);
var days = Math.floor(seconds / (3600 * 24));