diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java index 0793ccd44b..9f50f7726c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/SCMMXBean.java @@ -21,8 +21,6 @@ import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.jmx.ServiceRuntimeInfo; -import java.util.Map; - /** * * This is the JMX management interface for scm information. @@ -30,13 +28,6 @@ @InterfaceAudience.Private public interface SCMMXBean extends ServiceRuntimeInfo { - /** - * Get the number of data nodes that in all states. - * - * @return A state to number of nodes that in this state mapping - */ - Map getNodeCount(); - /** * Get the SCM RPC server port that used to listen to datanode requests. * @return SCM datanode RPC server port diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java index 719d642a79..b6c1f49716 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/ozone/scm/StorageContainerManager.java @@ -800,15 +800,6 @@ public int getNodeCount(NodeState nodestate) { return scmNodeManager.getNodeCount(nodestate); } - @Override - public Map getNodeCount() { - Map countMap = new HashMap(); - for (NodeState state : NodeState.values()) { - countMap.put(state.toString(), scmNodeManager.getNodeCount(state)); - } - return countMap; - } - /** * Returns node manager. * @return - Node Manager diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java index db0a459cba..5c065dbf20 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/scm/TestSCMMXBean.java @@ -90,10 +90,6 @@ public void testSCMMXBean() throws Exception { String clientRpcPort = (String)mbs.getAttribute(bean, "ClientRpcPort"); assertEquals(scm.getClientRpcPort(), clientRpcPort); - - TabularData nodeCountObj = (TabularData)mbs.getAttribute(bean, - "NodeCount"); - verifyEquals(nodeCountObj, scm.getNodeCount()); } @Test