HDFS-12684. Ozone: SCMMXBean NodeCount is overlapping with NodeManagerMXBean. Contributed by Weiwei Yang.
This commit is contained in:
parent
cc86719451
commit
6d9f914b55
|
@ -21,8 +21,6 @@ package org.apache.hadoop.ozone.scm;
|
|||
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 @@ import java.util.Map;
|
|||
@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<String, Integer> getNodeCount();
|
||||
|
||||
/**
|
||||
* Get the SCM RPC server port that used to listen to datanode requests.
|
||||
* @return SCM datanode RPC server port
|
||||
|
|
|
@ -800,15 +800,6 @@ public class StorageContainerManager extends ServiceRuntimeInfoImpl
|
|||
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.
|
||||
* @return - Node Manager
|
||||
|
|
|
@ -90,10 +90,6 @@ public class TestSCMMXBean {
|
|||
String clientRpcPort = (String)mbs.getAttribute(bean,
|
||||
"ClientRpcPort");
|
||||
assertEquals(scm.getClientRpcPort(), clientRpcPort);
|
||||
|
||||
TabularData nodeCountObj = (TabularData)mbs.getAttribute(bean,
|
||||
"NodeCount");
|
||||
verifyEquals(nodeCountObj, scm.getNodeCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue