-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-13136] Fix documentation error about stopping job with restful api #9013
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
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 38bdd2d (Wed Oct 16 08:17:21 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. The 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:
|
<td colspan="2"> | ||
<ul> | ||
<li><code>mode</code> (optional): String value that specifies the termination mode. Supported values are: "cancel, stop".</li> | ||
<li><code>mode</code> (optional): String value that specifies the termination mode. Supported value is: "cancel".</li> |
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.
As the html file located in docks/_includes/generated
, maybe you should change the source file TerminationModeQueryParameter
and regenerate the html file instead of changing the html file directly.
Also as the java doc said this is for the legacy usage, do we need to change it?
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.
Also as the java doc said this is for the legacy usage, do we need to change it?
I think the legacy usage is for cancel
mode now. Since stop
mode throws an exception, why we should document it for new users?
f7d9ea1
to
3c85f32
Compare
Hi @tillrohrmann WDYT about this PR? |
I am not sure if we need to do the further refactor, for example: removing |
@aljoscha WDYT? |
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.
Thank you for your contribution to Apache Flink, @yanghua! Excluding TerminationMode.STOP
from the documention is reasonable. However, I do not see the necessity to remove usages of the TerminationMode
enum.
JobCancellationMessageParameters params = new JobCancellationMessageParameters(); | ||
params.jobPathParameter.resolve(jobID); | ||
params.terminationModeQueryParameter.resolve(Collections.singletonList(TerminationModeQueryParameter.TerminationMode.CANCEL)); | ||
params.terminationModeQueryParameter.resolve(Collections.singletonList("CANCEL")); |
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 liked using the enum TerminationModeQueryParameter.TerminationMode
better because now we have to repeat String constants. The deprecation of TerminationModeQueryParameter
and TerminationMode
was wrong and should be reverted. What should be deprecated is TerminationMode.STOP
since TerminationMode.CANCEL
is still valid for non-checkpointed jobs and batch jobs.
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.
Originally, I also think enum is a good choice than string. However, when I removed TerminationMode.STOP
, there is only one enum value CANCEL
. I suspect that multiple modes may be the reason why we define TerminationMode
and I also saw the deprecation annotation, so I replaced enum with String value. Whatever, I am not against keeping TerminationMode
. Will refactor the change soon.
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.
Ok thanks. I will wait for your changes.
097af58
to
38bdd2d
Compare
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.
LGTM
Merging. |
…estful api This closes apache#9013.
What is the purpose of the change
This pull request fixes documentation error about stopping job with restful api
Brief change log
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)
: (yes / no)Documentation