MAPREDUCE-4380. Empty Userlogs directory is getting created under logs directory (Devaraj K via bobby)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1362612 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-07-17 19:14:33 +00:00
parent 8e576570a9
commit 603418c173
2 changed files with 9 additions and 8 deletions

View File

@ -254,6 +254,9 @@ Release 2.1.0-alpha - Unreleased
MAPREDUCE-4395. Possible NPE at ClientDistributedCacheManager
#determineTimestamps (Bhallamudi via bobby)
MAPREDUCE-4380. Empty Userlogs directory is getting created under logs
directory (Devaraj K via bobby)
Release 2.0.0-alpha - 05-23-2012
INCOMPATIBLE CHANGES

View File

@ -66,14 +66,6 @@ public class TaskLog {
// localFS is set in (and used by) writeToIndexFile()
static LocalFileSystem localFS = null;
static {
if (!LOG_DIR.exists()) {
boolean b = LOG_DIR.mkdirs();
if (!b) {
LOG.debug("mkdirs failed. Ignoring.");
}
}
}
public static String getMRv2LogDir() {
return System.getProperty(MRJobConfig.TASK_LOG_DIR);
@ -638,6 +630,12 @@ public static List<String> captureDebugOut(List<String> cmd,
* @return base log directory
*/
static File getUserLogDir() {
if (!LOG_DIR.exists()) {
boolean b = LOG_DIR.mkdirs();
if (!b) {
LOG.debug("mkdirs failed. Ignoring.");
}
}
return LOG_DIR;
}