Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-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 83AEA18745 for ; Thu, 27 Aug 2015 17:25:47 +0000 (UTC) Received: (qmail 93774 invoked by uid 500); 27 Aug 2015 17:25:47 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 93731 invoked by uid 500); 27 Aug 2015 17:25:47 -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 93720 invoked by uid 99); 27 Aug 2015 17:25:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2015 17:25:47 +0000 Date: Thu, 27 Aug 2015 17:25:47 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-12362) Set hadoop.tmp.dir and hadoop.log.dir in pom 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/HADOOP-12362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14717113#comment-14717113 ] Hudson commented on HADOOP-12362: --------------------------------- FAILURE: Integrated in Hadoop-trunk-Commit #8357 (See [https://builds.apache.org/job/Hadoop-trunk-Commit/8357/]) HADOOP-12362. Set hadoop.tmp.dir and hadoop.log.dir in pom. Contributed by Charlie Helin. (wang: rev 90fe7bcc3b30f8497d7a5124c91c5aea28f2fccb) * hadoop-common-project/hadoop-common/CHANGES.txt * hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/pom.xml * hadoop-project/pom.xml > Set hadoop.tmp.dir and hadoop.log.dir in pom > -------------------------------------------- > > Key: HADOOP-12362 > URL: https://issues.apache.org/jira/browse/HADOOP-12362 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 2.7.1 > Reporter: Charlie Helin > Assignee: Charlie Helin > Fix For: 2.8.0 > > Attachments: mr-6455.1.patch, mr-6455.2.patch, mr-6455.2.patch, mr-6455.3.patch, mr-6455.4.patch > > > There are some compelling features in later version of surefire which lets one exclude/include tests based the content of a file, re-running of test case etc. > However introduced in Surefire 2.18 is also https://issues.apache.org/jira/browse/SUREFIRE-649. Which changed the convention of null properties to empty string values (""). This only applies to forked tests such as the MapReduce tests and cause a couple of them to fail because of functionality that is directly or indirectly dependent on the value being null. One such example is Configuration.substituteVars() and TaskLog.getBaseLogDir(). > substituteVars() shows the issue when the getProperty returns empty String, skipping the getRaw(var) expression. One way to work around this could be > {code} > if (val == null || val.isEmpty()) { > String raw = getRaw(var); > if (raw != null) { > // raw contains a value, otherwise default to whatever System.getProperty returned > // since it could be an empty string > val = raw; > } > } > {code} > getBaseLogDir, similarly when returns an empty string the schematics of java.io.File differs dependent on whether parent is null or "". A null value is interpreted as new File(file); whereas "" will be interpreted as new File(defaultParent /* / */, file); > This could simply be addressed with > {code} > static String getBaseLogDir() { > String logDir = System.getProperty("hadoop.log.dir"); > // there is a difference how null and "" is treated as a parent > // directory when creating a file > return logDir == null || logDir.isEmpty() ? null : logDir; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)