flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2797][cli] Add support for running jobs...
Date Thu, 22 Oct 2015 16:39:17 GMT
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message