-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-14118. Support OBS keys and additional flags in ContainerToKeyMapping tool #9599
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
base: master
Are you sure you want to change the base?
Conversation
|
thanks for the patch @sarvekshayr ! |
Thanks for pointing it out @rich7420. Fixed it. |
sreejasahithi
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 @sarvekshayr for working on this.
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/debug/om/ContainerToKeyMapping.java
Outdated
Show resolved
Hide resolved
priyeshkaratha
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.
@sarvekshayr Thanks for working on this. Please see some minor comments.
| // Process FSO keys (fileTable) | ||
| processFSOKeys(containerIds, containerToKeysMap, unreferencedCountMap, bucketVolMap); | ||
|
|
||
| // Process OBS keys (keyTable) | ||
| processOBSKeys(containerIds, containerToKeysMap); | ||
|
|
||
| jsonOutput(writer, containerToKeysMap, unreferencedCountMap); | ||
| } |
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.
nit - please remove unnecessary new lines in the code. I can see after calling every method a new line is added.
| public Void call() throws Exception { | ||
| err().println("Note: A container can have both FSO and OBS keys. Currently this tool processes only FSO keys"); | ||
|
|
||
|
|
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.
nit - avoid this new line
What changes were proposed in this pull request?
ContainerToKeyMappingnow handles both FSO and OBS keys as a container may contain both types of keys.Introduced a flag
--onlyFileNamesthat allows listing only file names without rebuilding the full FSO tree in case of FSO keys. This significantly reduces processing time when we only need to quickly check whether any keys are affected.What is the link to the Apache JIRA
HDDS-14118
How was this patch tested?
Added tests in
TestContainerToKeyMapping.