YARN-3467. Expose allocatedMB, allocatedVCores, and runningContainers metrics on running Applications in RM Web UI. (Anubhav Dhoot via kasha)
(cherry picked from commit a8acdd65b3
)
This commit is contained in:
parent
68cddb894a
commit
6c80e599d1
|
@ -235,6 +235,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
YARN-3713. Remove duplicate function call storeContainerDiagnostics in
|
YARN-3713. Remove duplicate function call storeContainerDiagnostics in
|
||||||
ContainerDiagnosticsUpdateTransition (zxu via rkanter)
|
ContainerDiagnosticsUpdateTransition (zxu via rkanter)
|
||||||
|
|
||||||
|
YARN-3467. Expose allocatedMB, allocatedVCores, and runningContainers metrics on
|
||||||
|
running Applications in RM Web UI. (Anubhav Dhoot via kasha)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
YARN-3339. TestDockerContainerExecutor should pull a single image and not
|
YARN-3339. TestDockerContainerExecutor should pull a single image and not
|
||||||
|
|
|
@ -52,9 +52,9 @@ public class WebPageUtils {
|
||||||
.append(", 'mRender': renderHadoopDate }")
|
.append(", 'mRender': renderHadoopDate }")
|
||||||
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets':");
|
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets':");
|
||||||
if (isFairSchedulerPage) {
|
if (isFairSchedulerPage) {
|
||||||
sb.append("[11]");
|
sb.append("[13]");
|
||||||
} else if (isResourceManager) {
|
} else if (isResourceManager) {
|
||||||
sb.append("[10]");
|
sb.append("[12]");
|
||||||
} else {
|
} else {
|
||||||
sb.append("[9]");
|
sb.append("[9]");
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,8 @@ public class AppInfo {
|
||||||
protected long finishedTime;
|
protected long finishedTime;
|
||||||
protected long elapsedTime;
|
protected long elapsedTime;
|
||||||
protected String applicationTags;
|
protected String applicationTags;
|
||||||
|
private int allocatedCpuVcores;
|
||||||
|
private int allocatedMemoryMB;
|
||||||
|
|
||||||
public AppInfo() {
|
public AppInfo() {
|
||||||
// JAXB needs this
|
// JAXB needs this
|
||||||
|
@ -86,6 +88,10 @@ public class AppInfo {
|
||||||
if (app.getApplicationResourceUsageReport() != null) {
|
if (app.getApplicationResourceUsageReport() != null) {
|
||||||
runningContainers =
|
runningContainers =
|
||||||
app.getApplicationResourceUsageReport().getNumUsedContainers();
|
app.getApplicationResourceUsageReport().getNumUsedContainers();
|
||||||
|
allocatedCpuVcores = app.getApplicationResourceUsageReport()
|
||||||
|
.getUsedResources().getVirtualCores();
|
||||||
|
allocatedMemoryMB = app.getApplicationResourceUsageReport()
|
||||||
|
.getUsedResources().getMemory();
|
||||||
}
|
}
|
||||||
progress = app.getProgress() * 100; // in percent
|
progress = app.getProgress() * 100; // in percent
|
||||||
if (app.getApplicationTags() != null && !app.getApplicationTags().isEmpty()) {
|
if (app.getApplicationTags() != null && !app.getApplicationTags().isEmpty()) {
|
||||||
|
@ -133,6 +139,14 @@ public class AppInfo {
|
||||||
return runningContainers;
|
return runningContainers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAllocatedCpuVcores() {
|
||||||
|
return allocatedCpuVcores;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAllocatedMemoryMB() {
|
||||||
|
return allocatedMemoryMB;
|
||||||
|
}
|
||||||
|
|
||||||
public float getProgress() {
|
public float getProgress() {
|
||||||
return progress;
|
return progress;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,8 @@ public class FairSchedulerAppsBlock extends HtmlBlock {
|
||||||
th(".state", "State").
|
th(".state", "State").
|
||||||
th(".finalstatus", "FinalStatus").
|
th(".finalstatus", "FinalStatus").
|
||||||
th(".runningcontainer", "Running Containers").
|
th(".runningcontainer", "Running Containers").
|
||||||
|
th(".allocatedCpu", "Allocated CPU VCores").
|
||||||
|
th(".allocatedMemory", "Allocated Memory MB").
|
||||||
th(".progress", "Progress").
|
th(".progress", "Progress").
|
||||||
th(".ui", "Tracking UI")._()._().
|
th(".ui", "Tracking UI")._()._().
|
||||||
tbody();
|
tbody();
|
||||||
|
@ -136,6 +138,10 @@ public class FairSchedulerAppsBlock extends HtmlBlock {
|
||||||
.append(appInfo.getFinalStatus()).append("\",\"")
|
.append(appInfo.getFinalStatus()).append("\",\"")
|
||||||
.append(appInfo.getRunningContainers() == -1 ? "N/A" : String
|
.append(appInfo.getRunningContainers() == -1 ? "N/A" : String
|
||||||
.valueOf(appInfo.getRunningContainers())).append("\",\"")
|
.valueOf(appInfo.getRunningContainers())).append("\",\"")
|
||||||
|
.append(appInfo.getAllocatedVCores() == -1 ? "N/A" : String
|
||||||
|
.valueOf(appInfo.getAllocatedVCores())).append("\",\"")
|
||||||
|
.append(appInfo.getAllocatedMB() == -1 ? "N/A" : String
|
||||||
|
.valueOf(appInfo.getAllocatedMB())).append("\",\"")
|
||||||
// Progress bar
|
// Progress bar
|
||||||
.append("<br title='").append(percent)
|
.append("<br title='").append(percent)
|
||||||
.append("'> <div class='").append(C_PROGRESSBAR).append("' title='")
|
.append("'> <div class='").append(C_PROGRESSBAR).append("' title='")
|
||||||
|
|
|
@ -60,6 +60,8 @@ public class RMAppsBlock extends AppsBlock {
|
||||||
.th(".finishtime", "FinishTime").th(".state", "State")
|
.th(".finishtime", "FinishTime").th(".state", "State")
|
||||||
.th(".finalstatus", "FinalStatus")
|
.th(".finalstatus", "FinalStatus")
|
||||||
.th(".runningcontainer", "Running Containers")
|
.th(".runningcontainer", "Running Containers")
|
||||||
|
.th(".allocatedCpu", "Allocated CPU VCores")
|
||||||
|
.th(".allocatedMemory", "Allocated Memory MB")
|
||||||
.th(".progress", "Progress")
|
.th(".progress", "Progress")
|
||||||
.th(".ui", "Tracking UI").th(".blacklisted", "Blacklisted Nodes")._()
|
.th(".ui", "Tracking UI").th(".blacklisted", "Blacklisted Nodes")._()
|
||||||
._().tbody();
|
._().tbody();
|
||||||
|
@ -114,6 +116,12 @@ public class RMAppsBlock extends AppsBlock {
|
||||||
.append(app.getRunningContainers() == -1 ? "N/A" : String
|
.append(app.getRunningContainers() == -1 ? "N/A" : String
|
||||||
.valueOf(app.getRunningContainers()))
|
.valueOf(app.getRunningContainers()))
|
||||||
.append("\",\"")
|
.append("\",\"")
|
||||||
|
.append(app.getAllocatedCpuVcores() == -1 ? "N/A" : String
|
||||||
|
.valueOf(app.getAllocatedCpuVcores()))
|
||||||
|
.append("\",\"")
|
||||||
|
.append(app.getAllocatedMemoryMB() == -1 ? "N/A" : String
|
||||||
|
.valueOf(app.getAllocatedMemoryMB()))
|
||||||
|
.append("\",\"")
|
||||||
// Progress bar
|
// Progress bar
|
||||||
.append("<br title='").append(percent).append("'> <div class='")
|
.append("<br title='").append(percent).append("'> <div class='")
|
||||||
.append(C_PROGRESSBAR).append("' title='").append(join(percent, '%'))
|
.append(C_PROGRESSBAR).append("' title='").append(join(percent, '%'))
|
||||||
|
|
Loading…
Reference in New Issue