flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [2/2] flink git commit: [FLINK-4845] [runtime-web] Fix Job Exception page
Date Wed, 02 Nov 2016 09:48:37 GMT
[FLINK-4845] [runtime-web] Fix Job Exception page

This closes #2722.


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

Branch: refs/heads/master
Commit: d1fea26461c45cde6b03a2dfc5e3f41f18b4a2c5
Parents: c335d28
Author: zentol <chesnay@apache.org>
Authored: Fri Oct 28 15:44:19 2016 +0200
Committer: zentol <chesnay@apache.org>
Committed: Wed Nov 2 10:46:27 2016 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/util/ExceptionUtils.java       | 3 ++-
 .../flink/runtime/webmonitor/handlers/JobExceptionsHandler.java   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/d1fea264/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java b/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
index 7227006..cc7f56f 100644
--- a/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
+++ b/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
@@ -32,6 +32,7 @@ import java.io.StringWriter;
 
 @Internal
 public final class ExceptionUtils {
+	public static final String STRINGIFIED_NULL_EXCEPTION = "(null)";
 
 	/**
 	 * Makes a string representation of the exception's stack trace, or "(null)", if the
@@ -44,7 +45,7 @@ public final class ExceptionUtils {
 	 */
 	public static String stringifyException(final Throwable e) {
 		if (e == null) {
-			return "(null)";
+			return STRINGIFIED_NULL_EXCEPTION;
 		}
 		
 		try {

http://git-wip-us.apache.org/repos/asf/flink/blob/d1fea264/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobExceptionsHandler.java
----------------------------------------------------------------------
diff --git a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobExceptionsHandler.java
b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobExceptionsHandler.java
index 90197d0..376cca4 100644
--- a/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobExceptionsHandler.java
+++ b/flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/handlers/JobExceptionsHandler.java
@@ -23,6 +23,7 @@ import org.apache.flink.runtime.executiongraph.AccessExecutionGraph;
 import org.apache.flink.runtime.executiongraph.AccessExecutionVertex;
 import org.apache.flink.runtime.taskmanager.TaskManagerLocation;
 import org.apache.flink.runtime.webmonitor.ExecutionGraphHolder;
+import org.apache.flink.util.ExceptionUtils;
 
 import java.io.StringWriter;
 import java.util.Map;
@@ -59,7 +60,7 @@ public class JobExceptionsHandler extends AbstractExecutionGraphRequestHandler
{
 		
 		for (AccessExecutionVertex task : graph.getAllExecutionVertices()) {
 			String t = task.getFailureCauseAsString();
-			if (t != null) {
+			if (!t.equals(ExceptionUtils.STRINGIFIED_NULL_EXCEPTION)) {
 				if (numExceptionsSoFar >= MAX_NUMBER_EXCEPTION_TO_REPORT) {
 					truncated = true;
 					break;


Mime
View raw message