HDDS-7428. Change AllocateBlock API for precise allocation and better abstraction#3898
Closed
kaijchen wants to merge 18 commits intoapache:masterfrom
Closed
HDDS-7428. Change AllocateBlock API for precise allocation and better abstraction#3898kaijchen wants to merge 18 commits intoapache:masterfrom
kaijchen wants to merge 18 commits intoapache:masterfrom
Conversation
Member
Author
|
Hi @JacksonYao287, this PR implements the idea of better AllocateBlock abstraction #3882 (review). It's still work in progress though (need to add tests and handle compatibility), |
Member
Author
|
In Ozone weekly meeting, @ChenSammi mentioned the client might need to specify custom block size for compatibility with HDFS. So I have reused the |
Member
Author
|
Converted to draft to address compatibility issues. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Currently, AllocateBlock takes two major arguments: size and num. There are some problems in the current API:
size*ec.numData*num, which is not a good abstraction from the HDDS client's view.In this Jira, I wish to add a
requestedSizefield in the AllocateBlock RPC.SCM will calculate how many blocks to allocate based on
requestedSize,and return size of each block allocated to client.
The old
sizefield is used for the client specified block size, if set to 0, SCM will decide the block size.The old
numBlockfield is not used anymore.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7428
How was this patch tested?
UT: TestSCMBlockProtocolServer#testAllocateBlock
CI: https://github.com/kaijchen/ozone/actions/runs/3345373585