[
https://issues.apache.org/jira/browse/HADOOP-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601565#action_12601565
]
Brice Arnould commented on HADOOP-1380:
---------------------------------------
It is. I didn't knew that bug.
If I undestand well, #2721 suggests that we should implements a functionality
similar to this one by a call in the child to setsid().
So there is two approaches :
* #2721
We add a way for the child process to know the PID of it's TaskTracker. We
export this PID via the environement. The child process can then call
setsid(atoi(getenv("TASKTRACKER_PID"))) if he wants to be killed when the
TaskTracker dies.
Pro : We don't add a new class.
Cons : It's not portable (Posix only, not available on all languages) and
requires an explicit action of the user.
* #1380
Pro : Portable, we could add a config option so the admin can choose whether
child tasks are killed by default or not.
Cons : Add more code in Hadoop.
I know that I have a bias for #1380, since I wrote it But it's fine for me if
you rather #2721 ;-)
> We should have a util.Subprocess class with utilities for starting
> subprocesses
> -------------------------------------------------------------------------------
>
> Key: HADOOP-1380
> URL: https://issues.apache.org/jira/browse/HADOOP-1380
> Project: Hadoop Core
> Issue Type: New Feature
> Components: util
> Reporter: Owen O'Malley
> Assignee: Brice Arnould
> Attachments: SubProcessesManager.patch, SubProcessesManager_v2.patch
>
>
> I'd like a utility class for launching subprocesses. In particular, I want
> there to be a list of launched subprocesses and when the jvm is shutdown, a
> hook will destroy all of the subprocesses. Otherwise, when a task is killed,
> the subprocesses continue on.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.