-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-28209: Create a jmx metrics to expose the oldWALs directory size #5528
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
|
💔 -1 overall
This message was automatically generated. |
wchevreuil
left a comment
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 submitting this, @vinayakphegde ! I have some remarks, please see it inline.
| } | ||
|
|
||
| public ScheduledChore getOldWALsDirSizeUpdaterChore() { | ||
| return new ScheduledChore("UpdateOldWALsDirSize", createDummyStoppable(), OLD_WAL_DIR_UPDATE_INTERVAL) { |
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.
Can we make this interval configurable? This way we could also give the option to disable this chore altogether.
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.
If we disable it, won't we encounter issues with the incorrect results of the oldWALs directory size JMX metrics? Could that potentially be a problem? That's why I didn't make it configurable.
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 could return 0 or a negative value in the metric, and document that such values mean the metric calculation is disabled. I think it's worth to make it possible for operators to disable it because this would consume a spot in the ChoreExecutor pool, which could impact execution of other important background work, such as the file cleaners.
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.
Got it, will modify the code for that!
| }; | ||
| } | ||
|
|
||
| public ScheduledChore getOldWALsDirSizeUpdaterChore() { |
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.
Can we have this Chore imlemented on its own class? That way we don't need to define new methods on MasterWalManager that just concerns this Chore logic, like the createDummyStoppable and updateWalDirSize() above.
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.
Sure, Will do that
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
wchevreuil
left a comment
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 need UTs for:
- OldWALsDirSizeUpdaterChore;
- MetricsMasterWrapperImpl.getWalsDirSize
- The new metric itself (check TestMasterMetrics.testDefaultMasterMetrics)
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterWalManager.java
Outdated
Show resolved
Hide resolved
hbase-server/src/main/java/org/apache/hadoop/hbase/master/OldWALsDirSizeUpdaterChore.java
Show resolved
Hide resolved
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
#5528) Signed-off-by: Wellington Chevreuil <[email protected]>
apache#5528) Signed-off-by: Wellington Chevreuil <[email protected]>
apache#5528) Signed-off-by: Wellington Chevreuil <[email protected]>
This task introduces a new JMX metric to expose the size of the 'oldWALs' directory. To calculate the directory size, a ScheduledChore is implemented, allowing for efficient computation over a potentially time-consuming operation. The ScheduledChore updates the metrics at 5-minute intervals.