@Override public JobExecutionResult execute(String jobName) throws Exception { Plan p = createProgramPlan(jobName); setDetachedPlan(ClusterClient.getOptimizedPlan(client.compiler, p, getParallelism())); LOG.warn("Job was executed in detached mode, the results will be available on completion."); this.lastJobExecutionResult = DetachedJobExecutionResult.INSTANCE; return this.lastJobExecutionResult; }
@Override public ExecutionEnvironment createExecutionEnvironment() { if (isDetached && lastEnvCreated != null) { throw new InvalidProgramException("Multiple environments cannot be created in detached mode"); } lastEnvCreated = isDetached ? new DetachedEnvironment(client, jarFilesToAttach, classpathsToAttach, userCodeClassLoader, savepointSettings) : new ContextEnvironment(client, jarFilesToAttach, classpathsToAttach, userCodeClassLoader, savepointSettings); if (defaultParallelism > 0) { lastEnvCreated.setParallelism(defaultParallelism); } return lastEnvCreated; }
@Override public JobExecutionResult execute(String jobName) throws Exception { Preconditions.checkNotNull(jobName, "Streaming Job name should not be null."); StreamGraph streamGraph = this.getStreamGraph(); streamGraph.setJobName(jobName); transformations.clear(); // execute the programs if (ctx instanceof DetachedEnvironment) { LOG.warn("Job was executed in detached mode, the results will be available on completion."); ((DetachedEnvironment) ctx).setDetachedPlan(streamGraph); return DetachedEnvironment.DetachedJobExecutionResult.INSTANCE; } else { return ctx .getClient() .run(streamGraph, ctx.getJars(), ctx.getClasspaths(), ctx.getUserCodeClassLoader(), ctx.getSavepointRestoreSettings()) .getJobExecutionResult(); } } }
return ((DetachedEnvironment) factory.getLastEnvCreated()).finalizeExecute();
@Override public JobExecutionResult execute(String jobName) throws Exception { Preconditions.checkNotNull(jobName, "Streaming Job name should not be null."); StreamGraph streamGraph = this.getStreamGraph(); streamGraph.setJobName(jobName); transformations.clear(); // execute the programs if (ctx instanceof DetachedEnvironment) { LOG.warn("Job was executed in detached mode, the results will be available on completion."); ((DetachedEnvironment) ctx).setDetachedPlan(streamGraph); return DetachedEnvironment.DetachedJobExecutionResult.INSTANCE; } else { return ctx .getClient() .run(streamGraph, ctx.getJars(), ctx.getClasspaths(), ctx.getUserCodeClassLoader(), ctx.getSavepointRestoreSettings()) .getJobExecutionResult(); } } }
return ((DetachedEnvironment) factory.getLastEnvCreated()).finalizeExecute();
@Override public JobExecutionResult execute(String jobName) throws Exception { Plan p = createProgramPlan(jobName); setDetachedPlan(ClusterClient.getOptimizedPlan(client.compiler, p, getParallelism())); LOG.warn("Job was executed in detached mode, the results will be available on completion."); this.lastJobExecutionResult = DetachedJobExecutionResult.INSTANCE; return this.lastJobExecutionResult; }
@Override public JobExecutionResult execute(String jobName) throws Exception { Preconditions.checkNotNull("Streaming Job name should not be null."); StreamGraph streamGraph = this.getStreamGraph(); streamGraph.setJobName(jobName); transformations.clear(); // execute the programs if (ctx instanceof DetachedEnvironment) { LOG.warn("Job was executed in detached mode, the results will be available on completion."); ((DetachedEnvironment) ctx).setDetachedPlan(streamGraph); return DetachedEnvironment.DetachedJobExecutionResult.INSTANCE; } else { return ctx .getClient() .run(streamGraph, ctx.getJars(), ctx.getClasspaths(), ctx.getUserCodeClassLoader(), ctx.getSavepointRestoreSettings()) .getJobExecutionResult(); } } }
@Override public ExecutionEnvironment createExecutionEnvironment() { if (isDetached && lastEnvCreated != null) { throw new InvalidProgramException("Multiple environments cannot be created in detached mode"); } lastEnvCreated = isDetached ? new DetachedEnvironment(client, jarFilesToAttach, classpathsToAttach, userCodeClassLoader, savepointSettings) : new ContextEnvironment(client, jarFilesToAttach, classpathsToAttach, userCodeClassLoader, savepointSettings); if (defaultParallelism > 0) { lastEnvCreated.setParallelism(defaultParallelism); } return lastEnvCreated; }
return ((DetachedEnvironment) factory.getLastEnvCreated()).finalizeExecute();
@Override public JobExecutionResult execute(String jobName) throws Exception { Plan p = createProgramPlan(jobName); setDetachedPlan(ClusterClient.getOptimizedPlan(client.compiler, p, getParallelism())); LOG.warn("Job was executed in detached mode, the results will be available on completion."); this.lastJobExecutionResult = DetachedJobExecutionResult.INSTANCE; return this.lastJobExecutionResult; }
@Override public JobExecutionResult execute(String jobName) throws Exception { Preconditions.checkNotNull(jobName, "Streaming Job name should not be null."); StreamGraph streamGraph = this.getStreamGraph(); streamGraph.setJobName(jobName); transformations.clear(); // execute the programs if (ctx instanceof DetachedEnvironment) { LOG.warn("Job was executed in detached mode, the results will be available on completion."); ((DetachedEnvironment) ctx).setDetachedPlan(streamGraph); return DetachedEnvironment.DetachedJobExecutionResult.INSTANCE; } else { return ctx .getClient() .run(streamGraph, ctx.getJars(), ctx.getClasspaths(), ctx.getUserCodeClassLoader(), ctx.getSavepointRestoreSettings()) .getJobExecutionResult(); } } }
@Override public ExecutionEnvironment createExecutionEnvironment() { if (isDetached && lastEnvCreated != null) { throw new InvalidProgramException("Multiple enviornments cannot be created in detached mode"); } lastEnvCreated = isDetached ? new DetachedEnvironment(client, jarFilesToAttach, classpathsToAttach, userCodeClassLoader, savepointSettings): new ContextEnvironment(client, jarFilesToAttach, classpathsToAttach, userCodeClassLoader, savepointSettings); if (defaultParallelism > 0) { lastEnvCreated.setParallelism(defaultParallelism); } return lastEnvCreated; }
return ((DetachedEnvironment) factory.getLastEnvCreated()).finalizeExecute();
@Override public JobExecutionResult execute(String jobName) throws Exception { Plan p = createProgramPlan(jobName); setDetachedPlan(ClusterClient.getOptimizedPlan(client.compiler, p, getParallelism())); LOG.warn("Job was executed in detached mode, the results will be available on completion."); this.lastJobExecutionResult = DetachedJobExecutionResult.INSTANCE; return this.lastJobExecutionResult; }
@Override public ExecutionEnvironment createExecutionEnvironment() { if (isDetached && lastEnvCreated != null) { throw new InvalidProgramException("Multiple environments cannot be created in detached mode"); } lastEnvCreated = isDetached ? new DetachedEnvironment(client, jarFilesToAttach, classpathsToAttach, libjars, files, userCodeClassLoader, savepointSettings) : new ContextEnvironment(client, jarFilesToAttach, classpathsToAttach, libjars, files, userCodeClassLoader, savepointSettings); if (defaultParallelism > 0) { lastEnvCreated.setParallelism(defaultParallelism); } return lastEnvCreated; }