[ https://issues.apache.org/jira/browse/FLINK-2797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14969413#comment-14969413 ]
ASF GitHub Bot commented on FLINK-2797: --------------------------------------- Github user mxm commented on a diff in the pull request: https://github.com/apache/flink/pull/1214#discussion_r42772606 --- Diff: flink-clients/src/main/java/org/apache/flink/client/program/ContextEnvironment.java --- @@ -172,5 +184,74 @@ public ExecutionEnvironment createExecutionEnvironment() { } return env; } + + public static void setPlan(JobWithJars plan) { + if (_plan == null) { + _plan = plan; + } else { + throw new DetachedProgramException("The Job was submitted in detached mode. Only " + + "one execution is allowed. Please make sure your program doesn't call " + + "execute twice and/or doesn't call an eager execution function[collect, " + + "print, printToErr, count].\n"); + } + } + + public static JobWithJars getPlan() { + return _plan; + } + + public static JobGraph getGraph() { + return _graph; + } + + public static void setGraph(JobGraph graph) { + if (_graph == null) { + _graph = graph; + } else { + throw new DetachedProgramException("The Job was submitted in detached mode. Only " + + "one call to execute is allowed."); + } + } + } + + public static final class DetachedJobExecutionResult extends JobExecutionResult { + + public static final DetachedJobExecutionResult INSTANCE = new DetachedJobExecutionResult(); + + public DetachedJobExecutionResult() { --- End diff -- Constructor should be private to be a singleton. > CLI: Missing option to submit jobs in detached mode > --------------------------------------------------- > > Key: FLINK-2797 > URL: https://issues.apache.org/jira/browse/FLINK-2797 > Project: Flink > Issue Type: Bug > Components: Command-line client > Affects Versions: 0.9, 0.10 > Reporter: Maximilian Michels > Assignee: Sachin Goel > Fix For: 0.10 > > > Jobs can only be submitted in detached mode using YARN but not on a > standalone installation. This has been requested by users who want to submit > a job, get the job id, and later query its status. -- This message was sent by Atlassian JIRA (v6.3.4#6332)