Return-Path: Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: (qmail 60908 invoked from network); 26 Aug 2009 12:04:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Aug 2009 12:04:23 -0000 Received: (qmail 62924 invoked by uid 500); 26 Aug 2009 12:04:23 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 62868 invoked by uid 500); 26 Aug 2009 12:04:23 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 62858 invoked by uid 99); 26 Aug 2009 12:04:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 12:04:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Aug 2009 12:04:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6C035234C1F0 for ; Wed, 26 Aug 2009 05:03:59 -0700 (PDT) Message-ID: <235316153.1251288239441.JavaMail.jira@brutus> Date: Wed, 26 Aug 2009 05:03:59 -0700 (PDT) From: "Steve Loughran (JIRA)" To: common-issues@hadoop.apache.org Subject: [jira] Commented: (HADOOP-2681) NullPointerException in TaskRunner.java when system property "hadoop.log.dir" is not set MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747906#action_12747906 ] Steve Loughran commented on HADOOP-2681: ---------------------------------------- This problem still exists in 0.21 code, not at line 401 // Setup the log4j prop vargs.add("-Dhadoop.log.dir=" + new File(System.getProperty("hadoop.log.dir") ).getAbsolutePath()); The value of hadoop.log.dir should be driven by the configuration, not a system property. That system property could be an default, but it should be sufficient for a value in the configuration to be defined. > NullPointerException in TaskRunner.java when system property "hadoop.log.dir" is not set > ---------------------------------------------------------------------------------------- > > Key: HADOOP-2681 > URL: https://issues.apache.org/jira/browse/HADOOP-2681 > Project: Hadoop Common > Issue Type: Bug > Components: conf > Affects Versions: 0.15.2 > Reporter: Xu Zhang > Priority: Minor > > Currently, NullPointerException exception is thrown on line 321 in TaskRunner.java when system property "hadoop.log.dir" is not set. Instead of a NullPointerException exception, I expected a default value for "hadoop.log.dir" to be used, or to see a more meaningful error message that could have helped me figure out what was wrong (like, telling me that I needed to set "hadoop.log.dir" and how to do so). > Here is one instance of such exceptions: > WARN mapred.TaskRunner: task_200801181719_0001_m_000000_0 Child Error > java.lang.NullPointerException > at java.io.File.(File.java:222) > at org.apache.hadoop.mapred.TaskRunner.run(TaskRunner.java:321) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.