You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Alejandro Abdelnur (JIRA)" <ji...@apache.org> on 2008/05/20 08:34:55 UTC
[jira] Commented: (HADOOP-3415) JobEndNotifier isnt synchronized,
doesnt check state before acting
[ https://issues.apache.org/jira/browse/HADOOP-3415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598192#action_12598192 ]
Alejandro Abdelnur commented on HADOOP-3415:
--------------------------------------------
On #1 and #2, due to the lifecycle and singleton characteristics of this class and the JT this is not really an issue not have it synchronized. I would say there is not need for this.
On #3, the queue is a static variable statically initialized, thus is always not null.
I suggest closing this issue as invalid.
> JobEndNotifier isnt synchronized, doesnt check state before acting
> ------------------------------------------------------------------
>
> Key: HADOOP-3415
> URL: https://issues.apache.org/jira/browse/HADOOP-3415
> Project: Hadoop Core
> Issue Type: Bug
> Components: mapred
> Affects Versions: 0.16.3
> Reporter: Steve Loughran
> Priority: Minor
>
> JobEndNotifier is pretty hazardous inside.
> 1. the static startNotifier isnt synchronized, and doesnt check for being already running before it creates a new worker thread. It should be sycnhronized and a no-op if there is a live thread.
> 2. stopNotifier() should be a no-op if already stopped. It MUST NOT call thread.interrupt() in such a state, as thread may be null.
> 3. the registerNotification method also assumes that the static queue is non null.
> Things would be a lot safer by making this class part of a JobTracker, not a singleton with static methods, as then you could more safely make assumptions about object state. This would not only eliminate a lot of reentrancy problems, but tie the life of the notifier to that of its owner, the JobTracker.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.