-
Notifications
You must be signed in to change notification settings - Fork 590
HDDS-6229. [Ozone-Streaming] Data Channel abstraction on datanode #3023
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-6229. [Ozone-Streaming] Data Channel abstraction on datanode #3023
Conversation
szetszwo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guohao-rosicky , thanks for splitting #2860 . Please see the comments inlined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked the #2860 . This link(..) method is for
blockManager.putBlock(kvContainer, blockData);
We should call ContainerStateMachine.submitTask(..) instead of blockManager.putBlock(..). Otherwise, it will skip all the steps in-between.
So, we should remove this method and also this the interface since the interface becomes empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szetszwo
Like https://github.com/apache/ozone/pull/2860/files#diff-731ef3fb5d0f1e895fb7e91ee065e0a6177643164f9c6287134e3529cdf98a71R161
I need to get the BCSID at the putBlock stage.
And in https://issues.apache.org/jira/browse/HDDS-6137
We will add the putBlock into stream and need to get the BCSID through the link method.
See guohao-rosicky@9ef1867#diff-d7517af5785df16a7d6507c34f75ddc93969875fa24250033aeba5886bb831feR127
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to get the BCSID at the putBlock stage.
In ContainerStateMachine.link(..), build a DispatcherContext with the BCSID and then pass the DispatcherContext to submitTask(..), which will eventually call blockManager.putBlock(..).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szetszwo
I add putBlock into the channel, please check the logic of smallFileChannel, blockData is temporarily stored in the channel, so I need to return blockData in the channel, Is this bad for channel abstraction.
I added a comment in #2860, please see:
https://github.com/apache/ozone/pull/2860/files#r800366861
and
https://github.com/apache/ozone/pull/2860/files#r800366033
This helps us to discuss the problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getFile() is unused. Let's add it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'm going to delete it
e737e46 to
10980f5
Compare
szetszwo
left a comment
There was a problem hiding this 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.
|
By retriggering CI, I found that the test case reporting the error is irrelevant to the current change. The CI of HDDS-4454 branch is not stable at present, we can do rebase again after the master stable. We can merge this PR and then continue the optimization of small file and put block. Thanks @guohao-rosicky for the contribution and thanks @szetszwo for the review. |
|
@captainzmc , thanks for merging this. |
) (cherry picked from commit 3cc2a7e) (cherry picked from commit de690f6c259437bdce4389c7b06b189fa4cd20c0)
) (cherry picked from commit 4ce474c)
) (cherry picked from commit 4ce474c)
…ache#3023) (cherry picked from commit 4ce474c)
What changes were proposed in this pull request?
Data Channel abstraction on datanode
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6229
How was this patch tested?
see #2860