Skip to content

HDDS-15104. Refactor code related to container space management.#10124

Merged
ashishkumar50 merged 5 commits intoapache:masterfrom
ashishkumar50:HDDS-15104
Apr 28, 2026
Merged

HDDS-15104. Refactor code related to container space management.#10124
ashishkumar50 merged 5 commits intoapache:masterfrom
ashishkumar50:HDDS-15104

Conversation

@ashishkumar50
Copy link
Copy Markdown
Contributor

@ashishkumar50 ashishkumar50 commented Apr 24, 2026

What changes were proposed in this pull request?

Refactor below code:

  • Remove DatanodeBuckets map. Add TwoWindowBucket to DatanodeInfo
  • Remove containerSize parameter from pipelineManager.hasEnoughSpace(pipeline, containerSize)).
  • Remove the DatanodeDetails parameter from hasEffectiveAllocatableSpaceForNewContainer(..) since datanodeInfo already has all the information.
  • PendingContainerTracker using only DatanodeInfo.
  • Define new interface in nodemanager for to access container tracker.

What is the link to the Apache JIRA

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

How was this patch tested?

Updated existing test

Comment thread hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java Outdated
@szetszwo
Copy link
Copy Markdown
Contributor

@ashishkumar50 , thanks for working on this!

Please see the comment inlined in the previous comment and also https://issues.apache.org/jira/secure/attachment/13081849/10124_review.patch

@ashishkumar50
Copy link
Copy Markdown
Contributor Author

@szetszwo thanks for the suggestion, updated it.

@ashishkumar50
Copy link
Copy Markdown
Contributor Author

@ashishkumar50 , thanks for working on this!

Please see the comment inlined in the previous comment and also https://issues.apache.org/jira/secure/attachment/13081849/10124_review.patch

Removed getBucket and related code as we don't need pipeline in pendingContaierTracker. It will be called via pipelineManager.

Copy link
Copy Markdown
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

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

+1 the change looks good.

Copy link
Copy Markdown
Contributor

@rakeshadr rakeshadr left a comment

Choose a reason for hiding this comment

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

+1 refactoring looks good to me

@ashishkumar50 ashishkumar50 merged commit be1ed89 into apache:master Apr 28, 2026
47 checks passed
@ashishkumar50
Copy link
Copy Markdown
Contributor Author

@szetszwo @rakeshadr, Thanks for the review.

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.

4 participants