From 50fa38370468bf44031607dfed49b052cfc6d1e3 Mon Sep 17 00:00:00 2001 From: Andrew Wang Date: Thu, 27 Aug 2015 10:15:19 -0700 Subject: [PATCH] Revert "MAPREDUCE-6455. Unable to use surefire > 2.18. (Charlie Helin via kasha)" This reverts commit 61bf9cae6f3882c6e9a9222f59457b9be91e3018. --- .../main/java/org/apache/hadoop/conf/Configuration.java | 9 ++------- hadoop-mapreduce-project/CHANGES.txt | 2 -- .../src/main/java/org/apache/hadoop/mapred/TaskLog.java | 4 +--- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java index 6f1d3f8f79..0b4542966c 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java @@ -988,13 +988,8 @@ private String substituteVars(String expr) { } catch(SecurityException se) { LOG.warn("Unexpected SecurityException in Configuration", se); } - if (val == null || val.isEmpty()) { - String raw = getRaw(var); - if (raw != null) { - // if System.getProperty(var) returns an empty string, retain this - // value instead of return null - val = raw; - } + if (val == null) { + val = getRaw(var); } if (val == null) { return eval; // return literal ${var}: var is unbound diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 305b29e793..361a19b695 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -275,8 +275,6 @@ Trunk (Unreleased) MAPREDUCE-5801. Uber mode's log message is missing a vcore reason (Steven Wong via aw) - MAPREDUCE-6455. Unable to use surefire > 2.18. (Charlie Helin via kasha) - Release 2.8.0 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java index b8bb2f2a92..e07b5be287 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java @@ -181,9 +181,7 @@ static String obtainLogDirOwner(TaskAttemptID taskid) throws IOException { } static String getBaseLogDir() { - String logDir = System.getProperty("hadoop.log.dir"); - // file is treating "" different from null {@see File#File(String, String)} - return logDir == null || logDir.isEmpty() ? null : logDir; + return System.getProperty("hadoop.log.dir"); } static File getAttemptDir(TaskAttemptID taskid, boolean isCleanup) {