HDDS-10507. Revise NetworkTopology-based use cases to leverage custom equals() method
What changes were proposed in this pull request?
- The changes introduced in PR: #5391 involve reconstructing the hierarchical cluster tree object (that represents the network topology) on the Ozone Manager side.
- Under the
NetworkTopologyclass, various operations employ the==/!=operator for comparison. - However, this comparator needs to be modified to utilize the
InnerNode#equalsmethod instead. This adjustment is required as certain use cases, as described in1., involve object reconstruction necessitating custom equality comparisons based on individual object attributes.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10507
How was this patch tested?
Existing tests should cover the changes, Green Git CI: https://github.com/tanvipenumudy/ozone/actions/runs/8433408560
@adoroszlai, @ChenSammi could you please review the changes? Thanks.
cc: @kerneltime could you also please take a look, thanks.
Thank you @adoroszlai for the review, I have simplified the patch as suggested utilizing: java.utils.Objects#equals.
Thanks @tanvipenumudy for updating the patch, LGTM. If you don't want to wait for @kerneltime's review, it can be merged.
Sure, I believe we can check in the change, thank you @adoroszlai for the review!
Thanks @tanvipenumudy for the patch, @dineshchitlangia for the review.