-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-15842. HDFS mover to emit metrics. #2738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -0,0 +1,27 @@ | |||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is to pass the checkstyle as I added a new file to this package without package-info..
@@ -649,6 +664,11 @@ static int run(Map<URI, List<Path>> namenodes, Configuration conf) | |||
Map<Long, Set<DatanodeInfo>> excludedPinnedBlocks = new HashMap<>(); | |||
LOG.info("namenodes = " + namenodes); | |||
|
|||
DefaultMetricsSystem.initialize("Mover"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Balancer have a similar metrics? If not shall we use this PR or create a new one to do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have it in the internal branch with similar implementation but it is not in upstream yet.
Actually, there has been a JIRA long time ago for balancer metrics. https://issues.apache.org/jira/browse/HDFS-10648
I can rebase our changes there as a different PR after this.
26469e2
to
4dc6df6
Compare
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating the patch! The patch LGTM. Only one minor comment.
|
||
public static MoverMetrics create(Mover mover) { | ||
MoverMetrics m = new MoverMetrics(mover); | ||
DefaultMetricsSystem.instance().unregisterSource(m.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason we want to call unregister here? Can we call unregister at the end of the mover running?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, this is not needed here. As discussed I will shutdown metrics at the end of the mover run
💔 -1 overall
This message was automatically generated. |
+1 |
No description provided.