YARN-5184. Fix up incompatible changes introduced on ContainerStatus and NodeReport. Contributed by Sangjin Lee.

This commit is contained in:
Junping Du 2016-12-06 14:48:36 -08:00
parent 460fe6594a
commit 879caf688b
2 changed files with 25 additions and 7 deletions

View File

@ -122,9 +122,15 @@ public abstract class ContainerStatus {
*/
@Public
@Unstable
public abstract Resource getCapability();
public Resource getCapability() {
throw new UnsupportedOperationException(
"subclass must implement this method");
}
@Private
@Unstable
public abstract void setCapability(Resource capability);
public void setCapability(Resource capability) {
throw new UnsupportedOperationException(
"subclass must implement this method");
}
}

View File

@ -203,12 +203,18 @@ public abstract class NodeReport {
*/
@Public
@Stable
public abstract ResourceUtilization getAggregatedContainersUtilization();
public ResourceUtilization getAggregatedContainersUtilization() {
throw new UnsupportedOperationException(
"subclass must implement this method");
}
@Private
@Unstable
public abstract void setAggregatedContainersUtilization(ResourceUtilization
containersUtilization);
public void setAggregatedContainersUtilization(ResourceUtilization
containersUtilization) {
throw new UnsupportedOperationException(
"subclass must implement this method");
}
/**
* Get node resource utilization
@ -216,9 +222,15 @@ public abstract class NodeReport {
*/
@Public
@Stable
public abstract ResourceUtilization getNodeUtilization();
public ResourceUtilization getNodeUtilization() {
throw new UnsupportedOperationException(
"subclass must implement this method");
}
@Private
@Unstable
public abstract void setNodeUtilization(ResourceUtilization nodeUtilization);
public void setNodeUtilization(ResourceUtilization nodeUtilization) {
throw new UnsupportedOperationException(
"subclass must implement this method");
}
}