Repository: flink Updated Branches: refs/heads/master fef9f1158 -> e19ed78c7
[runtime] Properly set cause of ProducerFailedException Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/e19ed78c Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/e19ed78c Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/e19ed78c Branch: refs/heads/master Commit: e19ed78c72a9c2b67cca2a349ce02bbaac0d0f43 Parents: fef9f11 Author: Ufuk Celebi <[email protected]> Authored: Wed Jul 1 10:50:05 2015 +0200 Committer: Ufuk Celebi <[email protected]> Committed: Wed Jul 1 10:50:05 2015 +0200 ---------------------------------------------------------------------- .../flink/runtime/execution/CancelTaskException.java | 12 +++++++++--- .../io/network/partition/ProducerFailedException.java | 4 +--- 2 files changed, 10 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/e19ed78c/flink-runtime/src/main/java/org/apache/flink/runtime/execution/CancelTaskException.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/CancelTaskException.java b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/CancelTaskException.java index 959ab07..3bcbe2e 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/CancelTaskException.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/CancelTaskException.java @@ -19,16 +19,22 @@ package org.apache.flink.runtime.execution; /** - * Thrown to trigger a canceling of the executing task. Intended to cause a cancelled status, rather than a failed status. + * Thrown to trigger a canceling of the executing task. Intended to cause a cancelled status, rather + * than a failed status. */ public class CancelTaskException extends RuntimeException { + private static final long serialVersionUID = 1L; - public CancelTaskException(final String msg) { + public CancelTaskException(Throwable cause) { + super(cause); + } + + public CancelTaskException(String msg) { super(msg); } public CancelTaskException() { - super(""); + super(); } } http://git-wip-us.apache.org/repos/asf/flink/blob/e19ed78c/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ProducerFailedException.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ProducerFailedException.java b/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ProducerFailedException.java index 60da409..a966278 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ProducerFailedException.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ProducerFailedException.java @@ -24,9 +24,7 @@ public class ProducerFailedException extends CancelTaskException { private static final long serialVersionUID = -1555492656299526395L; - private final Throwable cause; - public ProducerFailedException(Throwable cause) { - this.cause = cause; + super(cause); } }
