Skip to content

Commit

Permalink
MAPREDUCE-6455. Unable to use surefire > 2.18. (Charlie Helin via kasha)
Browse files Browse the repository at this point in the history
  • Loading branch information
kambatla committed Aug 22, 2015
1 parent 745d04b commit 61bf9ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Expand Up @@ -988,8 +988,13 @@ private String substituteVars(String expr) {
} 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
Expand Down
2 changes: 2 additions & 0 deletions hadoop-mapreduce-project/CHANGES.txt
Expand Up @@ -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
Expand Down
Expand Up @@ -181,7 +181,9 @@ static String obtainLogDirOwner(TaskAttemptID taskid) throws IOException {
}

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) {
Expand Down

0 comments on commit 61bf9ca

Please sign in to comment.