Skip to content

Conversation

yanghua
Copy link
Contributor

@yanghua yanghua commented Jul 8, 2019

What is the purpose of the change

This pull request fixes documentation error about stopping job with restful api

Brief change log

  • Fix documentation error about stopping job with restful api

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:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 8, 2019

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 38bdd2d (Wed Oct 16 08:17:21 UTC 2019)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

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 commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

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

@klion26 klion26 Jul 8, 2019

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?

Copy link
Contributor Author

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?

@yanghua yanghua force-pushed the FLINK-13136 branch 3 times, most recently from f7d9ea1 to 3c85f32 Compare July 8, 2019 07:09
@flinkbot
Copy link
Collaborator

flinkbot commented Jul 8, 2019

CI report for commit 701e7c1: SUCCESS Build

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 8, 2019

CI report for commit 3c85f32: FAILURE Build

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 8, 2019

CI report for commit fa606d1: SUCCESS Build

@yanghua yanghua changed the title [FLINK-13136] Fix documentation error about stop job with restful api [FLINK-13136] Fix documentation error about stopping job with restful api Jul 9, 2019
@yanghua
Copy link
Contributor Author

yanghua commented Jul 11, 2019

Hi @tillrohrmann WDYT about this PR?

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 23, 2019

CI report:

@yanghua
Copy link
Contributor Author

yanghua commented Jul 23, 2019

I am not sure if we need to do the further refactor, for example: removing TerminationModeQueryParameter

@yanghua
Copy link
Contributor Author

yanghua commented Jul 23, 2019

@aljoscha WDYT?

@GJL GJL self-assigned this Sep 11, 2019
Copy link
Member

@GJL GJL left a 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"));
Copy link
Member

@GJL GJL Sep 12, 2019

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Member

@GJL GJL left a comment

Choose a reason for hiding this comment

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

LGTM

@GJL
Copy link
Member

GJL commented Sep 13, 2019

Merging.

GJL pushed a commit to GJL/flink that referenced this pull request Sep 13, 2019
@asfgit asfgit closed this in c59f483 Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants