HDFS-12684. Ozone: SCMMXBean NodeCount is overlapping with NodeManagerMXBean. Contributed by Weiwei Yang.

This commit is contained in:
Weiwei Yang 2017-10-24 14:09:33 +08:00 committed by Owen O'Malley
parent cc86719451
commit 6d9f914b55
3 changed files with 0 additions and 22 deletions

View File

@ -21,8 +21,6 @@ package org.apache.hadoop.ozone.scm;
import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.jmx.ServiceRuntimeInfo; import org.apache.hadoop.jmx.ServiceRuntimeInfo;
import java.util.Map;
/** /**
* *
* This is the JMX management interface for scm information. * This is the JMX management interface for scm information.
@ -30,13 +28,6 @@ import java.util.Map;
@InterfaceAudience.Private @InterfaceAudience.Private
public interface SCMMXBean extends ServiceRuntimeInfo { 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<String, Integer> getNodeCount();
/** /**
* Get the SCM RPC server port that used to listen to datanode requests. * Get the SCM RPC server port that used to listen to datanode requests.
* @return SCM datanode RPC server port * @return SCM datanode RPC server port

View File

@ -800,15 +800,6 @@ public class StorageContainerManager extends ServiceRuntimeInfoImpl
return scmNodeManager.getNodeCount(nodestate); return scmNodeManager.getNodeCount(nodestate);
} }
@Override
public Map<String, Integer> getNodeCount() {
Map<String, Integer> countMap = new HashMap<String, Integer>();
for (NodeState state : NodeState.values()) {
countMap.put(state.toString(), scmNodeManager.getNodeCount(state));
}
return countMap;
}
/** /**
* Returns node manager. * Returns node manager.
* @return - Node Manager * @return - Node Manager

View File

@ -90,10 +90,6 @@ public class TestSCMMXBean {
String clientRpcPort = (String)mbs.getAttribute(bean, String clientRpcPort = (String)mbs.getAttribute(bean,
"ClientRpcPort"); "ClientRpcPort");
assertEquals(scm.getClientRpcPort(), clientRpcPort); assertEquals(scm.getClientRpcPort(), clientRpcPort);
TabularData nodeCountObj = (TabularData)mbs.getAttribute(bean,
"NodeCount");
verifyEquals(nodeCountObj, scm.getNodeCount());
} }
@Test @Test