[
https://issues.apache.org/jira/browse/HADOOP-11328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14222653#comment-14222653
]
Hadoop QA commented on HADOOP-11328:
------------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest
attachment
http://issues.apache.org/jira/secure/attachment/12683258/ZKFailoverController.log.exception.1.patch
against trunk revision a4df9ee.
{color:green}+1 @author{color}. The patch does not contain any @author
tags.
{color:red}-1 tests included{color}. The patch doesn't appear to include
any new or modified tests.
Please justify why no new tests are needed for this
patch.
Also please list what manual steps were performed to
verify this patch.
{color:green}+1 javac{color}. The applied patch does not increase the
total number of javac compiler warnings.
{color:green}+1 javadoc{color}. There were no new javadoc warning messages.
{color:green}+1 eclipse:eclipse{color}. The patch built with
eclipse:eclipse.
{color:green}+1 findbugs{color}. The patch does not introduce any new
Findbugs (version 2.0.3) warnings.
{color:green}+1 release audit{color}. The applied patch does not increase
the total number of release audit warnings.
{color:green}+1 core tests{color}. The patch passed unit tests in
hadoop-common-project/hadoop-common.
{color:green}+1 contrib tests{color}. The patch passed contrib unit tests.
Test results:
https://builds.apache.org/job/PreCommit-HADOOP-Build/5115//testReport/
Console output:
https://builds.apache.org/job/PreCommit-HADOOP-Build/5115//console
This message is automatically generated.
> ZKFailoverController.java does not log Exception and causes latent problems
> during failover
> -------------------------------------------------------------------------------------------
>
> Key: HADOOP-11328
> URL: https://issues.apache.org/jira/browse/HADOOP-11328
> Project: Hadoop Common
> Issue Type: Bug
> Components: ha
> Affects Versions: 2.5.1
> Reporter: Tianyin Xu
> Attachments: ZKFailoverController.log.exception.1.patch
>
>
> In _ZKFailoverController.java_, the _Exception_ caught by the _run()_ method
> does not have a single error log. This causes latent problems that are only
> manifested during failover.
> h5. The problem we encountered
> An _Exception_ is thrown from the _doRun()_ method during _initHM()_ (caused
> by a configuration error). If you want to repeat, you can set
> "_ha.health-monitor.connect-retry-interval.ms_" to be any nonsensical value.
> {code:title=ZKFailoverController.java|borderStyle=solid}
> private int doRun(String[] args)
> ...
> initRPC();
> initHM();
> startRPC();
> ....
> }
> {code}
> The Exception is caught in the _run()_ method, as follows,
> {code:title=ZKFailoverController.java|borderStyle=solid}
> public int run(final String[] args) throws Exception {
> ...
> try {
> ...
> @Override
> public Integer run() {
> try {
> return doRun(args);
> } catch (Exception t) {
> throw new RuntimeException(t);
> } finally {
> if (elector != null) {
> elector.terminateConnection();
> }
> }
> }
> });
> } catch (RuntimeException rte) {
> throw (Exception)rte.getCause();
> }
> }
> {code}
> Unfortunately, the Exception (causing the shutdown of the process) is *not
> logged at all*. This causes latent errors which is only manifested during
> failover (because ZKFC is dead). The tricky thing here is that everything
> looks perfectly fine: the _jps_ command shows a running
> DFSZKFailoverController process and the two NameNode (active and standby)
> work fine.
> h5. Patch
> We strongly suggest to add a error log to notify the error caught, such as,
> ---
> hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
> (revision 1641307)
> +++
> hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
> (working copy)
> {code:title=@@ -178,6 +178,7 @@|borderStyle=solid}
> }
> });
> } catch (RuntimeException rte) {
> + LOG.fatal("The failover controller encounters runtime error: " + rte);
> throw (Exception)rte.getCause();
> }
> }
> {code}
> Thanks!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)