-
Notifications
You must be signed in to change notification settings - Fork 590
HDDS-6228. Update config keys for open key cleanup service #3022
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
errose28
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 picking up this feature @kaijchen, and sorry I am so late on the review here. One minor inline comment but overall this looks good.
It does not look like the tests that were setting open key cleanup actually need the config, so maybe we can remove those settings in this PR too.
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 the Ratis TimeDuration was used since existing time configs in this class and the other config key classes use it. I am not sure if it provides any benefits over the Java Duration class, but I think we should keep these as TimeDurations for consistency.
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.
Every other Ratis TimeDuration in this class is related to Ratis.
Either it starts with ozone.om.ratis.server or ozone.om.snapshot.
I changed this to java Duration because I think this config is not related to Ratis.
Do you think we still need to keep it as TimeDuration?
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.
That's a good point. Actually it looks like most existing intervals are either configured as Strings with suffixes or as longs. If we want to be matching I think Strings would be the best bet, but Duration is fine too.
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.
Yes, String is indeed better. And it's also the same representation as in ozone-default.xml.
|
Rebased to master to solve merge conflicts. |
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 @errose28 and @captainzmc for the review.
Sorry I forgot to address this, I will fix it when implementing HDDS-4123. |
What changes were proposed in this pull request?
Move config keys for open key cleanup service from OzoneConfigKeys to OMConfigKeys.
Change key names and default values as the design doc.
This change was part of #1511. The differences are:
org.apache.ratis.util.TimeDurationwas replaced byjava.time.Duration.Instant.now()is only called once per query ingetExpiredOpenKeys().Since the service needs refinement such as Quota and FSO support,
let's update the config keys first.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6228
How was this patch tested?
Integration tests.