Repository: hadoop Updated Branches: refs/heads/trunk fd31cb6cf -> d70d84570
HDDS-291. Initialize hadoop metrics system in standalone hdds datanodes. Contributed by Elek Marton. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d70d8457 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d70d8457 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d70d8457 Branch: refs/heads/trunk Commit: d70d84570575574b7e3ad0f00baf54f1dde76d97 Parents: fd31cb6 Author: Xiaoyu Yao <x...@apache.org> Authored: Thu Jul 26 13:17:37 2018 -0700 Committer: Xiaoyu Yao <x...@apache.org> Committed: Thu Jul 26 13:17:37 2018 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java | 2 ++ .../ozone/container/common/statemachine/SCMConnectionManager.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/d70d8457/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java ---------------------------------------------------------------------- diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java index ddeec87..f359e72 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java @@ -26,6 +26,7 @@ import org.apache.hadoop.hdds.HddsUtils; 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 class HddsDatanodeService implements ServicePlugin { System.exit(1); } StringUtils.startupShutdownMessage(HddsDatanodeService.class, args, LOG); + DefaultMetricsSystem.initialize("HddsDatanode"); HddsDatanodeService hddsDatanodeService = createHddsDatanodeService(conf); hddsDatanodeService.start(null); http://git-wip-us.apache.org/repos/asf/hadoop/blob/d70d8457/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/SCMConnectionManager.java ---------------------------------------------------------------------- diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/SCMConnectionManager.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/SCMConnectionManager.java index 19722f0..85fb580 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/SCMConnectionManager.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/SCMConnectionManager.java @@ -67,7 +67,7 @@ public class SCMConnectionManager this.rpcTimeout = timeOut.intValue(); this.scmMachines = new HashMap<>(); this.conf = conf; - jmxBean = MBeans.register("OzoneDataNode", + jmxBean = MBeans.register("HddsDatanode", "SCMConnectionManager", this); } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org