YARN-4151. Fix findbugs errors in hadoop-yarn-server-common module. (Meng Ding via wangda)
This commit is contained in:
parent
53bad4eb00
commit
e2a0270217
|
@ -826,6 +826,9 @@ Release 2.8.0 - UNRELEASED
|
|||
YARN-4115. Reduce loglevel of ContainerManagementProtocolProxy to Debug
|
||||
(adhoot via rkanter)
|
||||
|
||||
YARN-4151. Fix findbugs errors in hadoop-yarn-server-common module.
|
||||
(Meng Ding via wangda)
|
||||
|
||||
Release 2.7.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -293,7 +293,7 @@ public class NodeStatusPBImpl extends NodeStatus {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ResourceUtilization getContainersUtilization() {
|
||||
public synchronized ResourceUtilization getContainersUtilization() {
|
||||
NodeStatusProtoOrBuilder p =
|
||||
this.viaProto ? this.proto : this.builder;
|
||||
if (!p.hasContainersUtilization()) {
|
||||
|
@ -303,7 +303,7 @@ public class NodeStatusPBImpl extends NodeStatus {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setContainersUtilization(
|
||||
public synchronized void setContainersUtilization(
|
||||
ResourceUtilization containersUtilization) {
|
||||
maybeInitBuilder();
|
||||
if (containersUtilization == null) {
|
||||
|
@ -315,7 +315,7 @@ public class NodeStatusPBImpl extends NodeStatus {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ResourceUtilization getNodeUtilization() {
|
||||
public synchronized ResourceUtilization getNodeUtilization() {
|
||||
NodeStatusProtoOrBuilder p =
|
||||
this.viaProto ? this.proto : this.builder;
|
||||
if (!p.hasNodeUtilization()) {
|
||||
|
@ -325,7 +325,7 @@ public class NodeStatusPBImpl extends NodeStatus {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setNodeUtilization(
|
||||
public synchronized void setNodeUtilization(
|
||||
ResourceUtilization nodeUtilization) {
|
||||
maybeInitBuilder();
|
||||
if (nodeUtilization == null) {
|
||||
|
|
|
@ -51,8 +51,7 @@ public class WebPageUtils {
|
|||
sb.append("[\n")
|
||||
.append("{'sType':'string', 'aTargets': [0]")
|
||||
.append(", 'mRender': parseHadoopID }")
|
||||
.append("\n, {'sType':'numeric', 'aTargets': " +
|
||||
(isFairSchedulerPage ? "[6, 7]": "[6, 7]"))
|
||||
.append("\n, {'sType':'numeric', 'aTargets': [6, 7]")
|
||||
.append(", 'mRender': renderHadoopDate }")
|
||||
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets':");
|
||||
if (isFairSchedulerPage) {
|
||||
|
|
|
@ -167,6 +167,9 @@ public class WebServices {
|
|||
} catch (Exception e) {
|
||||
rewrapAndThrowException(e);
|
||||
}
|
||||
if (appReports == null) {
|
||||
return allApps;
|
||||
}
|
||||
for (ApplicationReport appReport : appReports) {
|
||||
|
||||
if (checkAppStates &&
|
||||
|
@ -266,6 +269,9 @@ public class WebServices {
|
|||
rewrapAndThrowException(e);
|
||||
}
|
||||
AppAttemptsInfo appAttemptsInfo = new AppAttemptsInfo();
|
||||
if (appAttemptReports == null) {
|
||||
return appAttemptsInfo;
|
||||
}
|
||||
for (ApplicationAttemptReport appAttemptReport : appAttemptReports) {
|
||||
AppAttemptInfo appAttemptInfo = new AppAttemptInfo(appAttemptReport);
|
||||
appAttemptsInfo.add(appAttemptInfo);
|
||||
|
@ -336,6 +342,9 @@ public class WebServices {
|
|||
rewrapAndThrowException(e);
|
||||
}
|
||||
ContainersInfo containersInfo = new ContainersInfo();
|
||||
if (containerReports == null) {
|
||||
return containersInfo;
|
||||
}
|
||||
for (ContainerReport containerReport : containerReports) {
|
||||
ContainerInfo containerInfo = new ContainerInfo(containerReport);
|
||||
containersInfo.add(containerInfo);
|
||||
|
|
Loading…
Reference in New Issue