HDDS-13232. Remove duplicate code in DirectoryDeletingService
What changes were proposed in this pull request?
DirectoryDeletingService#optimizeDirDeletesAndSubmitRequest and DirectoryDeletingService#processDeletedDirectories have duplicate code snippets. This patch refactors both methods and eliminates the duplicate part.
Please describe your PR in detail:
This patch has extracted a helper method processDirectoryRequests and a static inner class ProcessDirectoryResult to reduce duplicate code.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13232
How was this patch tested?
Given that it's just a refactor, the patch won't have any new test cases, and the existing tests should pass.
Hi thanks for working on this. Please run the command
./hadoop-ozone/dev-support/checks/checkstyle.sh
to verify checkstyle issues locally.
Thanks @frankvicky for the patch. Currently there are some integration test failures that slipped into master while CI status reporting was broken. Once issues on master are fixed, we'll update this PR to get real test results.
In the meantime, please take a look at the failure in TestDirectoryDeletingServiceWithFSO.
@frankvicky please enable the build-branch workflow in your fork.
@adoroszlai: Thanks for the reminder 🙇🏼
TestKeyDeletingService$Normal failed (maybe some flakiness is being introduced)
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.
@aryangupta1998 @swamirishi can you please help resolve conflicts?
@jojochuang can you please review after conflicts are resolved?
This IMO feels like forceful refactoring than a natural code progression. But I agree to the fact the curren code could be structured better. Let me see what we can do here
This PR has been marked as stale due to 21 days of inactivity. Please comment or remove the stale label to keep it open. Otherwise, it will be automatically closed in 7 days.
Thank you for your contribution. This PR is being closed due to inactivity. If needed, feel free to reopen it.