flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sachingoel0101 <...@git.apache.org>
Subject [GitHub] flink pull request: [FLINK-2797][cli] Add support for running jobs...
Date Tue, 27 Oct 2015 09:27:54 GMT
Github user sachingoel0101 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1214#discussion_r43098424
  
    --- Diff: flink-clients/src/main/java/org/apache/flink/client/program/Client.java ---
    @@ -271,18 +272,21 @@ public JobSubmissionResult runDetached(PackagedProgram prog, int
parallelism)
     		}
     		else if (prog.isUsingInteractiveMode()) {
     			LOG.info("Starting program in interactive mode");
    -			ContextEnvironment.setAsContext(this, prog.getAllLibraries(), prog.getClasspaths(),
    -				prog.getUserCodeClassLoader(), parallelism, false);
    -
    +			ContextEnvironment.ContextEnvironmentFactory factory = ContextEnvironment.setAsContext(this,
    +					prog.getAllLibraries(), prog.getClasspaths(), prog.getUserCodeClassLoader(), parallelism,
false);
     			// invoke here
     			try {
     				prog.invokeInteractiveModeForExecution();
    +				ContextEnvironment ctx = factory.getLastEnvironment();
    +				if (ctx == null) {
    +					throw new InvalidProgramException("No execution environment was created.");
    --- End diff --
    
    It's not strictly necessary. This should return a `JobSubmissionResult` with null job
id then.


---
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