flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [08/19] flink git commit: [FLINK-5739] [client] Fix NullPointerException in CliFrontend
Date Mon, 20 Feb 2017 00:55:22 GMT
[FLINK-5739] [client] Fix NullPointerException in CliFrontend

This closes #3292


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/5e32eb54
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/5e32eb54
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/5e32eb54

Branch: refs/heads/master
Commit: 5e32eb549d3bc2195548620005fcf54437e75f48
Parents: 3104619
Author: Zhuoluo Yang <zhuoluo.yzl@alibaba-inc.com>
Authored: Tue Feb 14 09:54:50 2017 +0800
Committer: Stephan Ewen <sewen@apache.org>
Committed: Mon Feb 20 01:01:23 2017 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/client/CliFrontend.java     | 6 ++++++
 .../flink/optimizer/plantranslate/JobGraphGenerator.java       | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/5e32eb54/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java b/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
index b6543a3..8c84c5a 100644
--- a/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
+++ b/flink-clients/src/main/java/org/apache/flink/client/CliFrontend.java
@@ -842,6 +842,12 @@ public class CliFrontend {
 			program.deleteExtractedLibraries();
 		}
 
+		if (null == result) {
+			logAndSysout("No JobSubmissionResult returned, please make sure you called " +
+				"ExecutionEnvironment.execute()");
+			return 1;
+		}
+
 		if (result.isJobExecutionResult()) {
 			logAndSysout("Program execution finished");
 			JobExecutionResult execResult = result.getJobExecutionResult();

http://git-wip-us.apache.org/repos/asf/flink/blob/5e32eb54/flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java
----------------------------------------------------------------------
diff --git a/flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java
b/flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java
index 4ccfae3..6f7b04a 100644
--- a/flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java
+++ b/flink-optimizer/src/main/java/org/apache/flink/optimizer/plantranslate/JobGraphGenerator.java
@@ -172,7 +172,8 @@ public class JobGraphGenerator implements Visitor<PlanNode> {
 	
 	public JobGraph compileJobGraph(OptimizedPlan program, JobID jobId) {
 		if (program == null) {
-			throw new NullPointerException();
+			throw new NullPointerException("Program is null, did you called " +
+				"ExecutionEnvironment.execute()");
 		}
 		
 		if (jobId == null) {


Mime
View raw message