You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by mx...@apache.org on 2015/11/03 16:33:40 UTC

[3/3] flink git commit: [FLINK-2958] Remove hard coded number of execution retries

[FLINK-2958] Remove hard coded number of execution retries


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

Branch: refs/heads/release-0.10
Commit: 199e7d07f99e2a42097a39f6b697938629de05ff
Parents: 630aae6
Author: Ufuk Celebi <uc...@apache.org>
Authored: Tue Nov 3 12:06:46 2015 +0100
Committer: Maximilian Michels <mx...@apache.org>
Committed: Tue Nov 3 16:33:20 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/flink/api/common/ExecutionConfig.java     | 6 +++---
 .../flink/streaming/api/graph/StreamingJobGraphGenerator.java | 7 +------
 2 files changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/199e7d07/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java b/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
index b620796..b031441 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java
@@ -246,7 +246,7 @@ public class ExecutionConfig implements Serializable {
 	public int getNumberOfExecutionRetries() {
 		return numberOfExecutionRetries;
 	}
-	
+
 	/**
 	 * Returns the delay between execution retries.
 	 */
@@ -269,9 +269,9 @@ public class ExecutionConfig implements Serializable {
 		this.numberOfExecutionRetries = numberOfExecutionRetries;
 		return this;
 	}
-	
+
 	/**
-	 * Sets the delay between executions. A value of {@code -1} indicates that the default value 
+	 * Sets the delay between executions. A value of {@code -1} indicates that the default value
 	 * should be used.
 	 * @param executionRetryDelay The number of milliseconds the system will wait to retry.
 	 */

http://git-wip-us.apache.org/repos/asf/flink/blob/199e7d07/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
index 6881d3c..b25a3e8 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGenerator.java
@@ -421,12 +421,7 @@ public class StreamingJobGraphGenerator {
 
 	private void configureExecutionRetries() {
 		int executionRetries = streamGraph.getExecutionConfig().getNumberOfExecutionRetries();
-		if (executionRetries != -1) {
-			jobGraph.setNumberOfExecutionRetries(executionRetries);
-		} else {
-			// if the user didn't configure anything, the number of retries is 0.
-			jobGraph.setNumberOfExecutionRetries(0);
-		}
+		jobGraph.setNumberOfExecutionRetries(executionRetries);
 	}
 
 	private void configureExecutionRetryDelay() {