-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-14130][client] Remove ClusterClient.run() methods #9921
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
|
|
||
| final JobSubmissionResult result = client.run(program, parallelism); | ||
|
|
||
| if (null == result) { |
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.
never be null
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.
What happens if the user program main() doesn't call execute? Could it then be null?
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.
see my comment below. We can always do the null check but it is redundant.
flink-clients/src/main/java/org/apache/flink/client/program/ContextEnvironment.java
Show resolved
Hide resolved
| return FlinkUserCodeClassLoaders.parentFirst(urls, parent); | ||
| } | ||
|
|
||
| public static JobSubmissionResult executeProgram( |
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.
to exclude detach configuration from ClusterClient, it would be later temporary move as a parameter of this method. This method is a temporary workaround to finish the job done by ContextEnvironment. I think FLIP-73 would properly handle it.
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit c17fdce (Fri Oct 18 09:12:03 UTC 2019) 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:
|
aljoscha
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.
This looks good! I had one comment, once that is resolved I can merge this.
And yes, the future work should move lastJobExecutionResult, maybe to ContextEnvironment, and also remove the "detached" flag from the client.
|
Merged! ☕️ |
|
Thanks for your review and help @aljoscha ! |
What is the purpose of the change
Remove legacy
runmethod inClusterClient. This is part of effort towards aClusterClientinterface.The following works contain make operations async and then we can remove
lastJobExecutionResultanddetachedJobSubmission, let them env configuration and taken care of by FLIP-73. Also shift downflinkConfig.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation