hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject hadoop git commit: MAPREDUCE-6455. Unable to use surefire > 2.18. (Charlie Helin via kasha)
Date Sat, 22 Aug 2015 07:42:23 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 745d04be5 -> 61bf9cae6


MAPREDUCE-6455. Unable to use surefire > 2.18. (Charlie Helin via kasha)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/61bf9cae
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/61bf9cae
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/61bf9cae

Branch: refs/heads/trunk
Commit: 61bf9cae6f3882c6e9a9222f59457b9be91e3018
Parents: 745d04b
Author: Karthik Kambatla <kasha@apache.org>
Authored: Sat Aug 22 00:38:47 2015 -0700
Committer: Karthik Kambatla <kasha@apache.org>
Committed: Sat Aug 22 00:39:04 2015 -0700

----------------------------------------------------------------------
 .../src/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, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/61bf9cae/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
----------------------------------------------------------------------
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 0b45429..6f1d3f8 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,8 +988,13 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
       } catch(SecurityException se) {
         LOG.warn("Unexpected SecurityException in Configuration", se);
       }
-      if (val == null) {
-        val = getRaw(var);
+      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) {
         return eval; // return literal ${var}: var is unbound

http://git-wip-us.apache.org/repos/asf/hadoop/blob/61bf9cae/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index 361a19b..305b29e 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -275,6 +275,8 @@ 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

http://git-wip-us.apache.org/repos/asf/hadoop/blob/61bf9cae/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/TaskLog.java
----------------------------------------------------------------------
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 e07b5be..b8bb2f2 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,7 +181,9 @@ public class TaskLog {
   }
 
   static String getBaseLogDir() {
-    return System.getProperty("hadoop.log.dir");
+    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;
   }
 
   static File getAttemptDir(TaskAttemptID taskid, boolean isCleanup) {


Mime
View raw message