Skip to content

Commit 4715da6

Browse files
committed
HDFS-17673. unregister BalancerMetrics after each iteration in doBalance
1 parent 4d78253 commit 4715da6

File tree

1 file changed

+1
-0
lines changed
  • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer

1 file changed

+1
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,7 @@ void resetData(Configuration conf) {
642642
this.underUtilized.clear();
643643
this.policy.reset();
644644
dispatcher.reset(conf);
645+
if (metrics!=null) DefaultMetricsSystem.instance().unregisterSource(metrics.getName());
645646
}
646647

647648
NameNodeConnector getNnc() {

0 commit comments

Comments
 (0)