You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2019/10/16 12:43:25 UTC

[flink] 14/15: [FLINK-14391] Remove JobID parameter from exception in RemoteStreamEnvironment

This is an automated email from the ASF dual-hosted git repository.

aljoscha pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 835e776a9038448333a05b6e08e7f036ae2c74be
Author: Aljoscha Krettek <al...@apache.org>
AuthorDate: Fri Oct 11 14:25:58 2019 +0200

    [FLINK-14391] Remove JobID parameter from exception in RemoteStreamEnvironment
    
    Creating a JobGraph from a StreamGraph using this method creates a
    random JobID that doesn't give any information.
---
 .../flink/streaming/api/environment/RemoteStreamEnvironment.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RemoteStreamEnvironment.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RemoteStreamEnvironment.java
index 1de834a..2574b8e 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RemoteStreamEnvironment.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RemoteStreamEnvironment.java
@@ -267,8 +267,7 @@ public class RemoteStreamEnvironment extends StreamExecutionEnvironment {
 			client = new RestClusterClient<>(configuration, "RemoteStreamEnvironment");
 		}
 		catch (Exception e) {
-			throw new ProgramInvocationException("Cannot establish connection to JobManager: " + e.getMessage(),
-				streamGraph.getJobGraph().getJobID(), e);
+			throw new ProgramInvocationException("Cannot establish connection to JobManager: " + e.getMessage(), e);
 		}
 
 		if (savepointRestoreSettings != null) {
@@ -288,8 +287,7 @@ public class RemoteStreamEnvironment extends StreamExecutionEnvironment {
 		}
 		catch (Exception e) {
 			String term = e.getMessage() == null ? "." : (": " + e.getMessage());
-			throw new ProgramInvocationException("The program execution failed" + term,
-				streamGraph.getJobGraph().getJobID(), e);
+			throw new ProgramInvocationException("The program execution failed" + term, e);
 		}
 		finally {
 			try {