Skip to content

Instantly share code, notes, and snippets.

@Aitozi
Created October 24, 2017 16:00
Show Gist options
  • Save Aitozi/5f48aa87757216c9ecea06e7fe0a80b6 to your computer and use it in GitHub Desktop.
Save Aitozi/5f48aa87757216c9ecea06e7fe0a80b6 to your computer and use it in GitHub Desktop.
Flink job启动分析
try {
// invoke main method
prog.invokeInteractiveModeForExecution();
if (lastJobExecutionResult == null && factory.getLastEnvCreated() == null) {
throw new ProgramMissingJobException();
}
if (isDetached()) {
// in detached mode, we execute the whole user code to extract the Flink job, afterwards we run it here
return ((DetachedEnvironment) factory.getLastEnvCreated()).finalizeExecute();
}
else {
// in blocking mode, we execute all Flink jobs contained in the user code and then return here
return this.lastJobExecutionResult;
}
}
finally {
ContextEnvironment.unsetContext();
}
//这一段没有看到lastJobExecutionResult状态的更新? why Flink-1.3.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment