Skip to content

Conversation

@guohao-rosicky
Copy link
Contributor

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

@captainzmc captainzmc requested a review from szetszwo January 27, 2022 07:58
Copy link
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.

@guohao-rosicky , thanks for splitting #2860 . Please see the comments inlined.

Comment on lines 31 to 32
Copy link
Contributor

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.

Copy link
Contributor Author

@guohao-rosicky guohao-rosicky Jan 28, 2022

Choose a reason for hiding this comment

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

Copy link
Contributor

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(..).

Copy link
Contributor Author

@guohao-rosicky guohao-rosicky Feb 7, 2022

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.

Comment on lines 61 to 63
Copy link
Contributor

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.

Copy link
Contributor Author

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

@guohao-rosicky
Copy link
Contributor Author

I have removed interface, and I will modify the implementation of putBlock in #2860 later.
@szetszwo Please take a look.

Copy link
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.

@captainzmc
Copy link
Member

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 captainzmc merged this pull request into apache:HDDS-4454 Feb 15, 2022
@szetszwo
Copy link
Contributor

@captainzmc , thanks for merging this.

captainzmc pushed a commit to captainzmc/hadoop-ozone that referenced this pull request Jul 4, 2022
szetszwo pushed a commit that referenced this pull request Oct 25, 2022
)

(cherry picked from commit 3cc2a7e)
(cherry picked from commit de690f6c259437bdce4389c7b06b189fa4cd20c0)
szetszwo pushed a commit that referenced this pull request Nov 7, 2022
)

(cherry picked from commit 3cc2a7e)
(cherry picked from commit de690f6c259437bdce4389c7b06b189fa4cd20c0)
(cherry picked from commit 3dde9e2)
szetszwo pushed a commit that referenced this pull request Dec 1, 2022
szetszwo pushed a commit that referenced this pull request Dec 16, 2022
nishitpatira pushed a commit to nishitpatira/ozone that referenced this pull request Dec 16, 2022
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.

3 participants