svn merge -c 1362612 FIXES: 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/branches/branch-2@1362613 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Joseph Evans 2012-07-17 19:15:30 +00:00
parent 71b35e827c
commit f8bd54b16a
2 changed files with 9 additions and 8 deletions

View File

@ -106,6 +106,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;
}