flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [2/2] flink git commit: [runtime] Log restart strategy on job submission
Date Tue, 23 Feb 2016 13:54:41 GMT
[runtime] Log restart strategy on job submission


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

Branch: refs/heads/master
Commit: dedcd2d103edf2ba3ad16ffd8d46011d1ec468a8
Parents: 1bb8013
Author: Ufuk Celebi <uce@apache.org>
Authored: Mon Feb 22 11:31:40 2016 +0100
Committer: Ufuk Celebi <uce@apache.org>
Committed: Tue Feb 23 14:54:09 2016 +0100

----------------------------------------------------------------------
 .../executiongraph/restart/FixedDelayRestartStrategy.java    | 8 ++++++++
 .../runtime/executiongraph/restart/NoRestartStrategy.java    | 5 +++++
 .../org/apache/flink/runtime/jobmanager/JobManager.scala     | 2 ++
 3 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/dedcd2d1/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
index 03571b8..d3c7eba 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
@@ -120,4 +120,12 @@ public class FixedDelayRestartStrategy implements RestartStrategy {
 
 		return new FixedDelayRestartStrategy(maxAttempts, delay);
 	}
+
+	@Override
+	public String toString() {
+		return "FixedDelayRestartStrategy(" +
+				"maxNumberRestartAttempts=" + maxNumberRestartAttempts +
+				", delayBetweenRestartAttempts=" + delayBetweenRestartAttempts +
+				')';
+	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/dedcd2d1/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/NoRestartStrategy.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/NoRestartStrategy.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/NoRestartStrategy.java
index 6be56ea..8911a98 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/NoRestartStrategy.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/NoRestartStrategy.java
@@ -45,4 +45,9 @@ public class NoRestartStrategy implements RestartStrategy {
 	public static NoRestartStrategy create(Configuration configuration) {
 		return new NoRestartStrategy();
 	}
+
+	@Override
+	public String toString() {
+		return "NoRestartStrategy";
+	}
 }

http://git-wip-us.apache.org/repos/asf/flink/blob/dedcd2d1/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
b/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
index f3b3883..1c6fce8 100644
--- a/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
+++ b/flink-runtime/src/main/scala/org/apache/flink/runtime/jobmanager/JobManager.scala
@@ -950,6 +950,8 @@ class JobManager(
             case None => defaultRestartStrategy
           }
 
+        log.info(s"Using restart strategy $restartStrategy for $jobId.")
+
         // see if there already exists an ExecutionGraph for the corresponding job ID
         executionGraph = currentJobs.get(jobGraph.getJobID) match {
           case Some((graph, currentJobInfo)) =>


Mime
View raw message