HDDS-14729. Address followup items in HDDS-14646#9838
HDDS-14729. Address followup items in HDDS-14646#9838sodonnel wants to merge 5 commits intoapache:HDDS-14496-zdufrom
Conversation
Gargi-jais11
left a comment
There was a problem hiding this comment.
Thanks @sodonnel for the patch. Found few more leftover dead codes.
|
|
||
| finalizationManager.buildUpgradeContext(scmNodeManager, pipelineManager, | ||
| scmContext); | ||
| finalizationManager.buildUpgradeContext(scmNodeManager, scmContext); |
There was a problem hiding this comment.
Nit: multiple backspaces.
| private SCMUpgradeFinalizer upgradeFinalizer; | ||
| private SCMUpgradeFinalizationContext context; | ||
| private SCMStorageConfig storage; | ||
| private OzoneConfiguration conf; |
There was a problem hiding this comment.
I think we should consider removing conf from Builder ? Since nothing in FinalizationManagerImpl reads or uses it. It’s effectively dead.
The Builder still has:
- private OzoneConfiguration conf;
- setConfiguration(OzoneConfiguration configuration)
- Objects.requireNonNull(conf, "conf == null") in build()
and corresponding to thatStorageContainerManagerstill calls .setConfiguration(conf) when building the FinalizationManagerImpl.
There was a problem hiding this comment.
I had removed this in an earlier version I reset and missed it on the second pass. I will remove it.
There was a problem hiding this comment.
Consider removing this PipelineManager as it only called in inorder as it is no longer used in SCM finalization (it was removed from the builder upgrade context), so it’s dead code in the test and can be removed.
There was a problem hiding this comment.
Yea, good point. I have removed it and the tests are passing locally at least.
Looks like you're referring to |
What changes were proposed in this pull request?
Address the left over comments from #9779 -
Remove unused methods:
SCMUpgradeFinalizationContext#getConfiguration
SCMUpgradeFinalizationContext#getLayoutVersionManager
SCMUpgradeFinalizationContext#getPipelineManager
Nits in TestHddsUpgradeUtils.java
Note that the change to
dsm.getContainer().getContainerSet().containerCount();cannot be made, as getContainerSet() in this instance doesn't return a set, but aniterator()and there is no count method available.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14729
How was this patch tested?
Existing tests.