-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-38757][runtime] Introduce the base class for application #27306
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
base: master
Are you sure you want to change the base?
Conversation
| FAILED(true), | ||
|
|
||
| /** The application is being cancelled. */ | ||
| CANCELLING(false), |
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.
It's better to name it as CANCELING to be aligned with CANCELED.
We do not need to follow the inconsistency in JobStatus.
| import java.util.concurrent.Executor; | ||
|
|
||
| /** Base class for all applications. */ | ||
| @Internal |
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 annotation is not needed because classes in flink-runtime module are internal by default.
| * <p>The returned CompletableFuture indicates that the execution request has been accepted and | ||
| * the application transitions to RUNNING state. | ||
| * | ||
| * <p><b>Note:</b> This method must be called on the main thread. |
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.
on -> in
You mean the main thread of which component?
| * | ||
| * <p>This method is not thread-safe and should not be called concurrently. | ||
| */ | ||
| public boolean addJob(JobID jobId) { |
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.
It's not required to be called in the main-thread? If not, how to ensure the state to be synchronized?
What is the purpose of the change
This pull request introduces the base class for application that supports state transitions and job bookkeeping.
Brief change log
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation