YARN-3751. Fixed AppInfo to check if used resources are null. Contributed by Sunil G.
(cherry picked from commit dbc4f64937
)
This commit is contained in:
parent
539ff92c2a
commit
aaa567514a
|
@ -431,6 +431,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
YARN-3740. Fixed the typo in the configuration name:
|
YARN-3740. Fixed the typo in the configuration name:
|
||||||
APPLICATION_HISTORY_PREFIX_MAX_APPS. (Xuan Gong via zjshen)
|
APPLICATION_HISTORY_PREFIX_MAX_APPS. (Xuan Gong via zjshen)
|
||||||
|
|
||||||
|
YARN-3751. Fixed AppInfo to check if used resources are null. (Sunil G via
|
||||||
|
zjshen)
|
||||||
|
|
||||||
Release 2.7.1 - UNRELEASED
|
Release 2.7.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -86,13 +86,15 @@ public class AppInfo {
|
||||||
elapsedTime = Times.elapsed(startedTime, finishedTime);
|
elapsedTime = Times.elapsed(startedTime, finishedTime);
|
||||||
finalAppStatus = app.getFinalApplicationStatus();
|
finalAppStatus = app.getFinalApplicationStatus();
|
||||||
if (app.getApplicationResourceUsageReport() != null) {
|
if (app.getApplicationResourceUsageReport() != null) {
|
||||||
runningContainers =
|
runningContainers = app.getApplicationResourceUsageReport()
|
||||||
app.getApplicationResourceUsageReport().getNumUsedContainers();
|
.getNumUsedContainers();
|
||||||
|
if (app.getApplicationResourceUsageReport().getUsedResources() != null) {
|
||||||
allocatedCpuVcores = app.getApplicationResourceUsageReport()
|
allocatedCpuVcores = app.getApplicationResourceUsageReport()
|
||||||
.getUsedResources().getVirtualCores();
|
.getUsedResources().getVirtualCores();
|
||||||
allocatedMemoryMB = app.getApplicationResourceUsageReport()
|
allocatedMemoryMB = app.getApplicationResourceUsageReport()
|
||||||
.getUsedResources().getMemory();
|
.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()) {
|
||||||
this.applicationTags = CSV_JOINER.join(app.getApplicationTags());
|
this.applicationTags = CSV_JOINER.join(app.getApplicationTags());
|
||||||
|
|
Loading…
Reference in New Issue