You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Steve Loughran (Commented) (JIRA)" <ji...@apache.org> on 2012/02/21 13:25:34 UTC
[jira] [Commented] (HADOOP-8096) add single point where
System.exit() is called for better handling in containers
[ https://issues.apache.org/jira/browse/HADOOP-8096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212539#comment-13212539 ]
Steve Loughran commented on HADOOP-8096:
----------------------------------------
code would look something like this:
{code}
public class Exiter {
public static Log LOG = LogFactory.getLog(Exiter.class);
public static void SystemExit(int exitCode, int reason) {
String operation = Thread.currentThread() + ": exiting with code "
+ exitCode + " reason" + reason;
LOG.info(operation);
try {
System.exit(exitCode);
} catch (SecurityException e) {
LOG.info(operation + " trapped by security manager");
throw new SecurityException(operation, e);
}
}
}
{code}
Calls of System.exit in -hdfs and -mapreduce would be replaced by calls of this with a reason string. Maybe an exception could optionally be passed down too.
> add single point where System.exit() is called for better handling in containers
> --------------------------------------------------------------------------------
>
> Key: HADOOP-8096
> URL: https://issues.apache.org/jira/browse/HADOOP-8096
> Project: Hadoop Common
> Issue Type: New Feature
> Components: util
> Affects Versions: 0.24.0
> Reporter: Steve Loughran
> Fix For: 0.24.0
>
>
> with plans for OSGI integration afoot in HADOOP-7977, Hadoop needs unified place where System.exit() calls. When one runs any bit of Hadoop in a containers the container will block those exits with a security manager and convert the calls into security exceptions. A single exit method would enable such exceptions to be logged, and conceivably handled slightly more gracefully (e.g. tell the daemon to die).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira