Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 47DACD120 for ; Mon, 9 Jul 2012 23:37:35 +0000 (UTC) Received: (qmail 97731 invoked by uid 500); 9 Jul 2012 23:37:35 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 97675 invoked by uid 500); 9 Jul 2012 23:37:35 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 97544 invoked by uid 99); 9 Jul 2012 23:37:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2012 23:37:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id A4845142850 for ; Mon, 9 Jul 2012 23:37:34 +0000 (UTC) Date: Mon, 9 Jul 2012 23:37:34 +0000 (UTC) From: "Eli Collins (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: <1308169186.25904.1341877054675.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1395284752.77083.1341188276449.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Updated] (HDFS-3582) Hook System.exit in MiniDFSCluster MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-3582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eli Collins updated HDFS-3582: ------------------------------ Attachment: hdfs-3582.txt Updated patch attached. - Was missing the Runtime#exit calls, fixed these and updated all the relevant edit log tests to match - Now passing a message to ExitUtil#terminate so the particular cause of the exist is captured in the exception is available to the tests - NB: I'm just hooking daemon exits, not eg all the tool exits (balancer, *admin, recovery mode) - Made logs "fatal" that were "error" but terminated - Made the NN/DN/2NN exit failure codes consistent (use 1 in places we were using -1) > Hook System.exit in MiniDFSCluster > ---------------------------------- > > Key: HDFS-3582 > URL: https://issues.apache.org/jira/browse/HDFS-3582 > Project: Hadoop HDFS > Issue Type: Improvement > Components: test > Affects Versions: 2.0.0-alpha > Reporter: Eli Collins > Assignee: Eli Collins > Priority: Minor > Attachments: hdfs-3582.txt, hdfs-3582.txt, hdfs-3582.txt, hdfs-3582.txt, hdfs-3582.txt > > > Occasionally the tests fail with "java.util.concurrent.ExecutionException: org.apache.maven.surefire.booter.SurefireBooterForkException: > Error occurred in starting fork, check output in log" because the NN is exit'ing (via System.exit or Runtime.exit). Unfortunately Surefire doesn't retain the log output (see SUREFIRE-871) so the test log is empty, we don't know which part of the test triggered which exit in HDFS. To make this debuggable, let's hook this in MiniDFSCluster via installing a security manager that overrides checkExit (ala TestClusterId) or mock out System.exit in the code itself. I think the former is preferable though we'll need to keep the door open for tests that want to set their own security manager (should be fine to override this one some times). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira