Merge -c 1485842 from trunk to branch-2 to fix HADOOP-9593 stack trace printed at ERROR for all yarn clients without hadoop.home set. Contributed by Steve Lougran.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1490102 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2013-06-06 01:19:52 +00:00
parent 5826b0c186
commit 0cb5e152d4
2 changed files with 12 additions and 4 deletions

View File

@ -236,6 +236,9 @@ Release 2.1.0-beta - UNRELEASED
HADOOP-9481. Broken conditional logic with HADOOP_SNAPPY_LIBRARY. (Vadim
Bondarev via atm)
HADOOP-9593. stack trace printed at ERROR for all yarn clients without
hadoop.home set (stevel)
BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS
HADOOP-8924. Hadoop Common creating package-info.java must not depend on

View File

@ -227,8 +227,10 @@ abstract public class Shell {
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 @@ abstract public class Shell {
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;
}