-
Notifications
You must be signed in to change notification settings - Fork 592
HDDS-4123. Integrate OM Open Key Cleanup Service Into Existing Code #1511
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
Closed
Closed
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
fe14a85
Remove extra serialization from getBlockID
errose28 3823d25
Initial setup for open key cleanup service implementation
errose28 eddf5ea
Update docs and formatting for open key cleanup service
errose28 0c0b8ef
Use TimeDuration to specify open key expiration time
errose28 4cfc293
Add open key cleanup service start and stop to key manager
errose28 f66008a
Disable service timeout for open key cleanup
errose28 8ec0a42
Make unit test use TimeDuration instead of long
errose28 1604d8b
Add initial implementation of open key cleanup integration tests
errose28 ee18fc7
Fix incorrect unit being used to read in time duration configurations
errose28 4f118f3
Implement open key creation method and remove unused methods
errose28 b1816d4
Add more robust volume and bcuket testing
errose28 7100ff7
Merge branch 'master' into HDDS-4123
errose28 97cff3f
Fix misnamed configuration
errose28 10bff2e
Add extra tests for to make sure open keys are added in setup
errose28 efadaf0
Add first draft setup using mini ozone cluster
errose28 6e5a5cc
Merge branch 'master' into HDDS-4123
errose28 e3caed3
Add checks based on key names, not just key counts
errose28 ce65c91
Move integration test for open key cleanup to the correct directory
errose28 66cf297
Rename all instances of old key expire threshold configuration to the…
errose28 a49978f
Add delete open key request type to ratis utils switch statement
errose28 5280d69
All integration tests with mini ozone cluster pass
errose28 db65a06
Add test without artifical key expiration of service firing
errose28 73a2419
Add documentation and minor code reformatting
errose28 0df85dc
Add new config properties to xml config
errose28 1021fd3
Correct hour unit in ozone-defaults.xml
errose28 9fd547e
Fix checkstyle violations
errose28 845ddaf
Fix indentation issues
errose28 6597e50
Update default config settings
errose28 f1d980a
Fix time unit in ozone-defaults.xml
errose28 895219c
Merge branch 'master' into HDDS-4123
errose28 04f763f
Retrigger CI
errose28 893ea5e
Add om prefix to new config names
errose28 4d89c18
Remove unnecessary open key expiration configs from tests
errose28 d539d25
Fix copy paste errors from KeyDeletingService
errose28 3dc26ad
Merge branch 'master' into HDDS-4123
errose28 5ccb8b6
Use new isLeaderReady() call
errose28 c8de2b9
Add testing and handling for keys with slashes in them
errose28 4860806
Add separate code path for HA and non-HA in cleanup service
errose28 5a0e172
First draft of parameterized HA/non-HA test
errose28 231922c
HA tests pass
errose28 656da18
Fix cluster configuration for non-HA, and add more comments
errose28 c74b01e
Fix checkstyle violations
errose28 38913c9
Merge branch 'master' into HDDS-4123
errose28 5a69252
Fix checkstyle and incorporate Ratis API changes
errose28 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,12 +33,13 @@ | |
|
|
||
| import java.io.IOException; | ||
| import java.util.UUID; | ||
| import java.util.concurrent.TimeUnit; | ||
| import java.util.concurrent.TimeoutException; | ||
| import java.util.concurrent.atomic.AtomicReference; | ||
|
|
||
| import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_ACL_ENABLED; | ||
| import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_ADMINISTRATORS_WILDCARD; | ||
| import static org.apache.hadoop.ozone.OzoneConfigKeys.OZONE_OPEN_KEY_EXPIRE_THRESHOLD_SECONDS; | ||
| import static org.apache.hadoop.ozone.om.OMConfigKeys.OZONE_OPEN_KEY_EXPIRE_THRESHOLD; | ||
|
|
||
| /** | ||
| * This class tests MiniOzoneHAClusterImpl. | ||
|
|
@@ -73,14 +74,15 @@ public void init() throws Exception { | |
| conf.setBoolean(OZONE_ACL_ENABLED, true); | ||
| conf.set(OzoneConfigKeys.OZONE_ADMINISTRATORS, | ||
| OZONE_ADMINISTRATORS_WILDCARD); | ||
| conf.setInt(OZONE_OPEN_KEY_EXPIRE_THRESHOLD_SECONDS, 2); | ||
| conf.setTimeDuration(OZONE_OPEN_KEY_EXPIRE_THRESHOLD, 2, TimeUnit.SECONDS); | ||
| cluster = (MiniOzoneHAClusterImpl) MiniOzoneCluster.newHABuilder(conf) | ||
| .setClusterId(clusterId) | ||
| .setScmId(scmId) | ||
| .setOMServiceId(omServiceId) | ||
| .setNumOfOzoneManagers(numOfOMs) | ||
| .build(); | ||
| cluster.waitForClusterToBeReady(); | ||
| cluster.restartOzoneManager(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need OM restart in init? |
||
| objectStore = OzoneClientFactory.getRpcClient(omServiceId, conf) | ||
| .getObjectStore(); | ||
| } | ||
|
|
||
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.
Minor: Do we want to append om to these configs?
Generally, most OM configs have "ozone.om"
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, I added the
ozone.omprefix.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 you update the config variable name OZONE_OPEN_KEY_CLEANUP_SERVICE_INTERVAL also to include "OM".
The convention for variable names is to have the exact words as is in the config key.