Skip to content

Conversation

@siddhantsangwan
Copy link
Contributor

What changes were proposed in this pull request?

Renamed the following method to isECContainerAndLegacyRMEnabled. isECContainer was misleading, because Container Balancer supports balancing EC containers. This PR only changes the method names and updates java doc. No logic change.

  private boolean isECContainer(ContainerInfo container) {
    return container.getReplicationType().equals(HddsProtos.ReplicationType.EC)
        && replicationManager.getConfig().isLegacyEnabled();
  }

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10085

How was this patch tested?

Ran existing tests.

@siddhantsangwan
Copy link
Contributor Author

@umamaheswararao @adoroszlai @sodonnel Can someone please review? Just a method name and java doc improvement.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @siddhantsangwan for the patch, LGTM.

I was looking at it earlier, but didn't want to nitpick on the name. I'm fine with the existing name, the new one, or the one I suggest. :)

* .enable.legacy" is true, else false
*/
private boolean isECContainer(ContainerInfo container) {
private boolean isECContainerAndLegacyRMEnabled(ContainerInfo container) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's just me, but this suggests to me as if Enabled applies to both legacy RM and EC container.

How about isUnsupportedType (or similar), to hide internal details?

@adoroszlai adoroszlai merged commit b932e16 into apache:master Jan 14, 2024
@siddhantsangwan
Copy link
Contributor Author

Thanks @adoroszlai for the review.

ptlrs pushed a commit to ptlrs/ozone that referenced this pull request Mar 8, 2025
…DDS-10870 (apache#221)

* CDPD-65217. HDDS-10085. Improve method name in ContainerBalancerSelectionCriteria (apache#5957)

(cherry picked from commit b932e16)

* CDPD-65645. HDDS-10160. Cache sort results in ContainerBalancerSelectionCriteria (apache#6050)

(cherry picked from commit 95666eb)

* CDPD-52140. HDDS-7252. Polled source Datanodes are wrongly not re-considered for balancing in Container Balancer (apache#6305)

(cherry picked from commit fdc38b5)

* CDPD-70112. HDDS-10869. SCMNodeManager#getUsageInfo memory occupancy optimization (apache#6737)

(cherry picked from commit 39baf0f)

* CDPD-70110. HDDS-10871. ContainerBalancerSelectionCriteria memory occupancy optimization (apache#6738)

(cherry picked from commit 19d4419)

* CDPD-70111. HDDS-10870. moveSelectionToFutureMap cleanup when future complete (apache#6746)

(cherry picked from commit 4f02853)

* CDPD-78919. HDDS-12231. Logging in Container Balancer is too verbose. (apache#7826)

(cherry picked from commit 371792f)

---------

Conflicts:

1. Forced to include CDPD-65217 (minor commit that only changes a method name) and CDPD-52140 to resolve conflicts. No major changes made.
2. Had to change a test method to use the full Assertions.assertEquals instead of just assertEquals.
3. CDPD-70111 - had to merge manually to exclude changes from other unrelated commits in ContainerBalancerTask.


---------

Co-authored-by: Siddhant Sangwan <[email protected]>
Co-authored-by: Symious <[email protected]>
Co-authored-by: Tejaskriya <[email protected]>
Co-authored-by: hao guo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants