diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java index 839fd04579..d7c75f3072 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ContainerStatus.java @@ -85,11 +85,17 @@ public static ContainerStatus newInstance(ContainerId containerId, */ @Public @Evolving - public abstract ExecutionType getExecutionType(); + public ExecutionType getExecutionType() { + throw new UnsupportedOperationException( + "subclass must implement this method"); + } @Private @Unstable - public abstract void setExecutionType(ExecutionType executionType); + public void setExecutionType(ExecutionType executionType) { + throw new UnsupportedOperationException( + "subclass must implement this method"); + } /** * Get the ContainerState of the container. @@ -148,11 +154,17 @@ public static ContainerStatus newInstance(ContainerId containerId, */ @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"); + } /** * Get all the IP addresses with which the container run. @@ -160,11 +172,17 @@ public static ContainerStatus newInstance(ContainerId containerId, */ @Public @Unstable - public abstract List getIPs(); + public List getIPs() { + throw new UnsupportedOperationException( + "subclass must implement this method"); + } @Private @Unstable - public abstract void setIPs(List ips); + public void setIPs(List ips) { + throw new UnsupportedOperationException( + "subclass must implement this method"); + } /** * Get the hostname where the container runs. @@ -172,9 +190,15 @@ public static ContainerStatus newInstance(ContainerId containerId, */ @Public @Unstable - public abstract String getHost(); + public String getHost() { + throw new UnsupportedOperationException( + "subclass must implement this method"); + } @Private @Unstable - public abstract void setHost(String host); + public void setHost(String host) { + throw new UnsupportedOperationException( + "subclass must implement this method"); + } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java index 412010a749..885a3b4b35 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/NodeReport.java @@ -203,12 +203,18 @@ public static NodeReport newInstance(NodeId nodeId, NodeState nodeState, */ @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