-
Notifications
You must be signed in to change notification settings - Fork 621
HDDS-7648. Add a servername tag in UGI metrics. #4094
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2c18e38
Add servername tag to Prometheus metrics
mladjan-gadzic 8e4f3b7
Refactor for readability and move utils to util class
mladjan-gadzic ada071a
Remove dependecy from hdds to ozone and refactor to increase readability
mladjan-gadzic 2fde42b
Refactor class name to be inline with naming conventions and add javadoc
mladjan-gadzic e7ce28d
Merge branch 'master' into HDDS-7648
mladjan-gadzic c368c45
Remove uneccessary test and set servername in constructor
mladjan-gadzic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Please do not introduce backwards dependency (
hdds -> ozone). If we want to access some code currently inozonefrom both, we should move it tohdds.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.
There is a need for
org.apache.hadoop.ozone.om.OMConfigKeys. Where exactly do you propose it should be moved to make the most sense out of this?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.
org.apache.hadoop.ozone.ompackage (ompart yet to be created but at same level whereorg.apache.hadoop.hdds.scm.ScmConfigKeysresides) fromcommonmodule fromhadoop-hdds(hdds-commonartifact id) sounds reasonable enough, but there are quite a few moving parts together withorg.apache.hadoop.ozone.om.OMConfigKeys.Uh oh!
There was an error while loading. Please reload this page.
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.
@adoroszlai Thanks for looking into this. I don't think there is a package where we can access both
OMConfigKeysandScmConfigKeysbut we might be able to simplify the switch case that requires both of them. We present prometheus metrics only for SCM and OM. We can only check theScmConfigKeysand if it doesn't match then we can assume the server is OM without checkingOMConfigKeys.This might not be the best approach. We have the hostname available. There might be a way to use that to get the server.
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.
@adoroszlai @xBis7 Thanks for the suggestions! Check for
ScmConfigKeysis enough right now - it might not be the best future proof solution but it is still better than moving tons of classes just in order to useOMConfigKeys.Uh oh!
There was an error while loading. Please reload this page.
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.
I think there's a simple, more generic solution:
PrometheusMetricsSinkis created inBaseHttpServer, which has service-specific subclasses. So define a method inBaseHttpServerthat returns the info you want to pass toPrometheusMetricsSink, then override inOzoneManagerHttpServer, etc.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.
@adoroszlai This might be exactly what I was looking for. Thanks for suggestion, will try to expand on it!