HDDS-14118. Support OBS keys and additional flags in ContainerToKeyMapping tool#9599
HDDS-14118. Support OBS keys and additional flags in ContainerToKeyMapping tool#9599sumitagrawl merged 3 commits intoapache:masterfrom
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.
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.
@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.
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.
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.