HDDS-291. Initialize hadoop metrics system in standalone hdds datanodes. Contributed by Elek Marton.

This commit is contained in:
Xiaoyu Yao 2018-07-26 13:17:37 -07:00
parent fd31cb6cfe
commit d70d845705
2 changed files with 3 additions and 1 deletions

View File

@ -26,6 +26,7 @@
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import org.apache.hadoop.hdfs.DFSUtil;
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
import org.apache.hadoop.ozone.container.common.helpers.ContainerUtils;
import org.apache.hadoop.ozone.container.common.statemachine
.DatanodeStateMachine;
@ -241,6 +242,7 @@ public static void main(String[] args) {
System.exit(1);
}
StringUtils.startupShutdownMessage(HddsDatanodeService.class, args, LOG);
DefaultMetricsSystem.initialize("HddsDatanode");
HddsDatanodeService hddsDatanodeService =
createHddsDatanodeService(conf);
hddsDatanodeService.start(null);

View File

@ -67,7 +67,7 @@ public SCMConnectionManager(Configuration conf) {
this.rpcTimeout = timeOut.intValue();
this.scmMachines = new HashMap<>();
this.conf = conf;
jmxBean = MBeans.register("OzoneDataNode",
jmxBean = MBeans.register("HddsDatanode",
"SCMConnectionManager",
this);
}