forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-2111] Add "stop" signal to cleanly shutdown streaming jobs
- added JobType to JobGraph and ExecutionGraph - added interface Stoppable, applied to SourceStreamTask - added STOP signal logic to JobManager, TaskManager, ExecutionGraph - extended Client to support stop - extended Cli frontend, JobManager frontend - updated documenation Fix JobManagerTest.testStopSignal and testStopSignalFail The StoppableInvokable could not be instantiated by Task because it was declared as a private class. Adds additional checks to verify that the stop signal behaves correctly. Auto-detect if job is stoppable A job is stoppable iff all sources are stoppable - Replace JobType by stoppable flag - Add StoppableFunction and StoppableInvokable to support the optional stop operation - added REST get/delete test (no extra YARN test -- think not required as get/delete is both tested) - bug fix: job got canceld instead of stopped in web interface - Add StoppingException - Allow to stop jobs when they are not in state RUNNING Second round of Till's comments
- Loading branch information
1 parent
5eae47f
commit bdd4024
Showing
53 changed files
with
3,389 additions
and
1,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
flink-clients/src/main/java/org/apache/flink/client/cli/StopOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.apache.flink.client.cli; | ||
|
||
import org.apache.commons.cli.CommandLine; | ||
|
||
/** | ||
* Command line options for the STOP command | ||
*/ | ||
public class StopOptions extends CommandLineOptions { | ||
|
||
private final String[] args; | ||
|
||
public StopOptions(CommandLine line) { | ||
super(line); | ||
this.args = line.getArgs(); | ||
} | ||
|
||
public String[] getArgs() { | ||
return args == null ? new String[0] : args; | ||
} | ||
} |
Oops, something went wrong.