You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/12/19 20:03:29 UTC
[GitHub] [hadoop] Jing9 commented on a diff in pull request #5203: HDFS-16867. Exiting Mover due to an exception in MoverMetrics.create
Jing9 commented on code in PR #5203:
URL: https://github.com/apache/hadoop/pull/5203#discussion_r1052583684
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/NameNodeConnector.java:
##########
@@ -161,6 +162,7 @@ public static void checkOtherInstanceRunning(boolean toCheck) {
private final Path idPath;
private OutputStream out;
private final List<Path> targetPaths;
+ private final MoverMetrics moverMetrics;
Review Comment:
NameNodeConnector will also be used by Balancer, while MoverMetrics is only used by Mover. So not sure if placing MoverMetrics directly in NameNodeConnector is a good way from the semantic perspective.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java:
##########
@@ -160,7 +160,7 @@ Collections.<String> emptySet(), movedWinWidth, moverThreads, 0,
BlockStoragePolicySuite.ID_BIT_LENGTH];
this.excludedPinnedBlocks = excludedPinnedBlocks;
this.nnc = nnc;
- this.metrics = MoverMetrics.create(this);
Review Comment:
If the main issue if the potential naming conflict caused by multiple mover instances, can we track the existing MoverMetrics instances and their NNC mappings at the class level (i.e. through a class static field) to avoid the duplication?
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/mover/Mover.java:
##########
@@ -160,7 +160,7 @@ Collections.<String> emptySet(), movedWinWidth, moverThreads, 0,
BlockStoragePolicySuite.ID_BIT_LENGTH];
this.excludedPinnedBlocks = excludedPinnedBlocks;
this.nnc = nnc;
- this.metrics = MoverMetrics.create(this);
+ this.metrics = nnc.getMoverMetrics();
Review Comment:
We also need to add some UTs to reproduce the issue (without your fix) and validate the fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org