flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [hotfix] Guard against clock changes when computing the net runtime of a job
Date Thu, 29 Mar 2018 08:35:49 GMT
Repository: flink
Updated Branches:
  refs/heads/master e5ed2fbc4 -> b0fbb8989


[hotfix] Guard against clock changes when computing the net runtime of a job


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

Branch: refs/heads/master
Commit: b0fbb89898bdfc72445464a2547e088e825f4c55
Parents: e5ed2fb
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Wed Mar 28 22:40:34 2018 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Wed Mar 28 22:40:34 2018 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/flink/runtime/jobmaster/JobResult.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/b0fbb898/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobResult.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobResult.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobResult.java
index 7688404..60ddbe3 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobResult.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/JobResult.java
@@ -189,7 +189,9 @@ public class JobResult implements Serializable {
 		builder.jobId(jobId);
 
 		final long netRuntime = accessExecutionGraph.getStatusTimestamp(jobStatus) - accessExecutionGraph.getStatusTimestamp(JobStatus.CREATED);
-		builder.netRuntime(netRuntime);
+		// guard against clock changes
+		final long guardedNetRuntime = Math.max(netRuntime, 0L);
+		builder.netRuntime(guardedNetRuntime);
 		builder.accumulatorResults(accessExecutionGraph.getAccumulatorsSerialized());
 
 		if (jobStatus != JobStatus.FINISHED) {


Mime
View raw message