From c64309f6ab6ba282420b11078941ca5512a0eff9 Mon Sep 17 00:00:00 2001 From: Tsuyoshi Ozawa Date: Mon, 4 May 2015 17:47:37 +0900 Subject: [PATCH] HADOOP-11328. ZKFailoverController does not log Exception when doRun raises errors. Contributed by Tianyin Xu. (cherry picked from commit bb9ddef0e7603b60d25250bb53a7ae9f147cd3cd) --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../main/java/org/apache/hadoop/ha/ZKFailoverController.java | 1 + 2 files changed, 4 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 0c555988e59..945c9dbe2ce 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -67,6 +67,9 @@ Release 2.8.0 - UNRELEASED HADOOP-11357. Print information of the build enviornment in test-patch.sh (aw) + HADOOP-11328. ZKFailoverController does not log Exception when doRun raises + errors. (Tianyin Xu via ozawa) + OPTIMIZATIONS HADOOP-11785. Reduce the number of listStatus operation in distcp diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java index f58c3f4de99..9eb1ff84500 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java @@ -180,6 +180,7 @@ public abstract class ZKFailoverController { } }); } catch (RuntimeException rte) { + LOG.fatal("The failover controller encounters runtime error: " + rte); throw (Exception)rte.getCause(); } }