Staff Software Practice Lead
When a Flink job is executed, it is sent to the Flink cluster where it will pass through multiple possible stages in its lifecycle. The exact flow depends on what commands are sent to the job, and whether or not it encounters any errors. This video will introduce the lifecycle of a Flink job as well as some of the commands that can be used to move the job through different lifecycle states.
Topics:
public static void main(String[] args) throws Exception {
StreamExecutionEnvironment env = StreamExecutionEnvironment
.getExecutionEnvironment();
env.fromElements(1,2,3,4,5).print();
env.execute();
}
$ flink run $JAR_FILE
$ flink run -c mypackage.MyClass $JAR_FILE
$ flink run --detached $JAR_FILE
$ flink cancel $JOB_ID
$ flink stop --savepointPath $SAVEPOINT_FOLDER $JOB_ID
$ flink run --fromSavepoint $SAVEPOINT_FILE $JAR_FILE
env.setRestartStrategy(RestartStrategies.fixedDelayRestart(
3, // number of restart attempts
Time.of(10, TimeUnit.SECONDS) // delay
));
We will only share developer content and updates, including notifications when new content is added. We will never send you sales emails. 🙂 By subscribing, you understand we will process your personal information in accordance with our Privacy Statement.