It would be nice to let users deploy detached jobs through api.
For instance>
*StreamExecutionEnviroment*
public JobExecutionResult execute() throws Exception {
return execute(DEFAULT_JOB_NAME, false);
}
Which keep backward compatibility
public abstract JobExecutionResult execute(String jobName, boolean
detached) throws Exception;
*RemoteStreamEnvironment*
@Override
public JobExecutionResult execute(String jobName, boolean detached) throws
ProgramInvocationException {
StreamGraph streamGraph = getStreamGraph();
streamGraph.setJobName(jobName);
transformations.clear();
return executeRemotely(streamGraph, jarFiles, detached);
}
---------------------
protected JobExecutionResult executeRemotely(StreamGraph streamGraph,
List<URL> jarFiles, boolean detached) throws ProgramInvocationException {
.....
ClusterClient client;
try {
client = new StandaloneClusterClient(configuration);
client.setDetached(detached);
client.setPrintStatusDuringExecution(getConfig().isSysoutLoggingEnabled());
}
....
}
Just an idea. I'm using the previous approach and it works fine.
Thanks
--
View this message in context:
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Detached-execution-API-tp14366.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at
Nabble.com.