Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_includes/generated/rest_v1_dispatcher.html
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@
<tr>
<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?

</ul>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@

package org.apache.flink.runtime.rest.messages;

import org.apache.flink.util.StringUtils;

/**
* Termination mode.
* @deprecated Only kept to detect legacy usages of the cancel/stop command. Please use the "stop" command instead.
* Termination mode query parameter.
*/
public class TerminationModeQueryParameter extends MessageQueryParameter<TerminationModeQueryParameter.TerminationMode> {

Expand All @@ -44,15 +41,18 @@ public String convertValueToString(TerminationMode value) {

@Override
public String getDescription() {
return "String value that specifies the termination mode. Supported values are: " +
StringUtils.toQuotedListString(TerminationMode.values()) + '.';
return "String value that specifies the termination mode. Supported value is: \"cancel\"" + '.';
}

/**
* @deprecated Please use the "stop" command instead.
* Termination mode.
*/
public enum TerminationMode {
CANCEL,

/**
* @deprecated Please use the "stop" command instead.
*/
STOP
}
}