hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8096) add single point where System.exit() is called for better handling in containers
Date Fri, 16 Mar 2012 10:55:40 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-8096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13231051#comment-13231051
] 

Steve Loughran commented on HADOOP-8096:
----------------------------------------

The place where it would be useful is those routines that see themselves in a mess and go
{{LOG.error(text, e); System.exit(-1)}}. In classes in the main thread translating this to
an exception and raising it will intercept the problem and can trigger a more graceful shutdown
in an OSGi container.

What is tricky is threads who make the same call; translate this to an exception and the thread
goes away, but the exception isn't reported up and the code keeps going, only now some thread
has disappeared. In this situation there's a need to report the problem to the container.

The OSGi experts need to be involved here, as the only thing I can think of is having the
{{catch(SecurityException se)}} handler look for some JVM property giving the name of a class
to load and reflect into that for a method like {{systemExitCalled(...)}}. Which puts you
straight into the world of OSGi classloaders, as this handler would presumably be something
in the container.  

Of course, that could be feature creep once the method is in - and system behaviour will be
the same as normal when not run under a security handler. 
                
> 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
>            Assignee: Csaba Miklos
>            Priority: Trivial
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-8096.patch
>
>
> 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

        

Mime
View raw message