HADOOP-9593 stack trace printed at ERROR for all yarn clients without hadoop.home set

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1485842 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Steve Loughran 2013-05-23 20:08:25 +00:00
parent 43876770d9
commit 10d21ac779
2 changed files with 13 additions and 5 deletions

View File

@ -370,7 +370,10 @@ Trunk (Unreleased)
HADOOP-9481. Broken conditional logic with HADOOP_SNAPPY_LIBRARY. (Vadim
Bondarev via atm)
OPTIMIZATIONS
HADOOP-9593. stack trace printed at ERROR for all yarn clients without
hadoop.home set (stevel)
OPTIMIZATIONS
HADOOP-7761. Improve the performance of raw comparisons. (todd)

View File

@ -227,8 +227,10 @@ private static String checkHadoopHome() {
home = homedir.getCanonicalPath();
} catch (IOException ioe) {
LOG.error("Failed to detect a valid hadoop home directory", ioe);
home = null;
if (LOG.isDebugEnabled()) {
LOG.debug("Failed to detect a valid hadoop home directory", ioe);
}
home = null;
}
return home;
@ -305,10 +307,13 @@ private static boolean isSetsidSupported() {
shexec = new ShellCommandExecutor(args);
shexec.execute();
} catch (IOException ioe) {
LOG.warn("setsid is not available on this machine. So not using it.");
LOG.debug("setsid is not available on this machine. So not using it.");
setsidSupported = false;
} finally { // handle the exit code
LOG.info("setsid exited with exit code " + shexec.getExitCode());
if (LOG.isDebugEnabled()) {
LOG.debug("setsid exited with exit code "
+ (shexec != null ? shexec.getExitCode() : "(null executor)"));
}
}
return setsidSupported;
}