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

Amar Kamat commented on HADOOP-4521:
------------------------------------

One way I can think is to have  the listeners add themselves to a 
{{JobListenerManager}} which will be implemented by the {{JobTracker}}. The 
{{JobListenerManager}} interface, for now, will implement the following 
interfaces 
- addJobInProgressListener(JobInProgressListener)
- removeJobInProgressListener(JobInProgressListener)
- update(JobChangeEvent)

For example a listener might init the job, generate an event and then inform 
the {{JobListenerManager}} about it.

Also the {{JobInProgressListener}} interface should add itself to the 
{{JobListenerManager}} rather than some third party adding it. This can be done 
by adding a {{addJobListenerManager(JobListenerManager)}} interface to 
{{JobInProgressListener}} or extend the listener's constructor to accept a 
{{JobListenerManager}}.

Internally the listener should maintain the reference to the 
{{JobListenerManager}} and should change/update a job only via 
{{JobListenerManager.update()}}. 
JobListenerManager should take the responsibility of updating other listeners.

> A JobInProgressLIstener can change a job without informing other listeners
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-4521
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4521
>             Project: Hadoop Core
>          Issue Type: Improvement
>          Components: mapred
>            Reporter: Amar Kamat
>
> As of now the {{JobInProgressListener}} adds itself to the {{JobTracker}} and 
> gets updated/informed. Some of there {{JobInProgressListener}}'s control 
> these changes/events (e.g.  {{EagerTaskInitializer}}). The issue with this 
> model is that a listener can change the job without informing other 
> listeners. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to