-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-26077][runtime] Support operators send request to Coordinator and return a response #18737
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
Conversation
…and return a response
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 1d6f803 (Sat Feb 12 04:02:58 UTC 2022) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
@gaoyunhaii could you help to review this? when you are available. very appreciated it. |
|
@wuchong Thanks for the PR! I'll have a look~ |
gaoyunhaii
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.
Thanks @wuchong for the PR! I only have two minor comments.
| } | ||
| } | ||
|
|
||
| // this one |
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.
This seems unnecessary?
| void sendOperatorEventToCoordinator(OperatorID operator, SerializedValue<OperatorEvent> event); | ||
|
|
||
| /** | ||
| * Send a request from current operator to a specified operator coordinator which is identified |
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.
Send -> Sends ?
|
Thanks @gaoyunhaii for the reviewing. I have addressed the comments and will merge it once the CI passed. |
…and return a response (apache#18737)
What is the purpose of the change
Currently, the communitcation between Operator and Coordiator is sigle-way. That means, after Operator sending a message to Coordiator, it can't wait to get the response message. In some senarios, the Operator may need to retrieve some information stored in the Coordinator. Thus, it would be great if we can have a two-way communication.
Brief change log
sendRequestToCoordinator(..)interface toTaskOperatorEventGatewaywhich accepts a request and returns a response future. TheTaskOperatorEventGatewaycan be obtained by opereator used to communicate with coordinator.sendRequestToCoordinatoriterface toJobMasterOperatorEventGatewayas the RPC method for Task to JM. JobMaster implement the interface to handover the request to correspond OperatorCoordinator.CoordinationRequestHandlerinterface (already exist) to handle the received requests.CollectSinkOperatorCoordinatoralready does it in this way.Verifying this change
CoordinatorEventsExactlyOnceITCaseTaskExecutorOperatorEventHandlingTestDoes this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation