[
https://issues.apache.org/jira/browse/HADOOP-3801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615870#action_12615870
]
Vivek Ratan commented on HADOOP-3801:
-------------------------------------
I agree with your comments in general, and it makes sense to look at an API as
an abstract class first, for the reasons you've mentioned. However, in this
particular case, it seems like we lose a lot by not having interfaces. It's not
just a scheduler and a JobInProgressListener class that need to share state. We
will most likely add support for listening to task changes. Once we have API
for TaskProgressListener, it's very likely that the same class/data structures
will be needed for handling job changes as well as task changes. Making
TaskInProgressListener an abstract class will make this sharing more clunky.
Furthermore, it's highly unlikely that we will have default implementations for
JobInProgressListener and TaskInProgressListener. These really do expose
abstract methods. I just can't see what any decent default implementations will
do, without access to data structures that deal with JobInProgress objects and
scheduling information.
> Change the job state observer classes to interfaces
> ---------------------------------------------------
>
> Key: HADOOP-3801
> URL: https://issues.apache.org/jira/browse/HADOOP-3801
> Project: Hadoop Core
> Issue Type: Improvement
> Reporter: Owen O'Malley
> Assignee: Vivek Ratan
>
> Schedulers will most often want to be the observers of the job state events
> in a single class. Therefore, I think they should be interfaces which can
> have multiple inheritance.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.