[
https://issues.apache.org/jira/browse/HADOOP-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adrian Woodhead updated HADOOP-2268:
------------------------------------
Attachment: HADOOP-2268-3.patch
OK, here is another version which scales back this patch so as not to have any
backward compat issues. I have left the implementation "leak" in public methods
but have changed the private Hashtables in JobControl.java to Maps. For the
dependingJobs list in Job.java, I have added the type param <Job> to remove the
compiler warnings which were the original motivator for this patch. I haven't
gone with the suggestion of adding a method addDependentJob as the word
"dependent" means jobs that depend on you whereas here we mean jobs that you
depend on so I can see this leading to confusion if we changed it, the names
are correct as they are. This unfortunately means I can't figure out a way to
get around the implementation leak without breaking backward compat so I
suggest we just leave it for now. This is a problem in many other hadoop
classes so my suggestion would be to tackle this as one big issue one day if
you decide you are going to do a release that is going to break backward compat.
> JobControl classes should use interfaces rather than implemenations
> -------------------------------------------------------------------
>
> Key: HADOOP-2268
> URL: https://issues.apache.org/jira/browse/HADOOP-2268
> Project: Hadoop
> Issue Type: Improvement
> Components: mapred
> Affects Versions: 0.15.0
> Reporter: Adrian Woodhead
> Assignee: Adrian Woodhead
> Priority: Minor
> Fix For: 0.16.0
>
> Attachments: HADOOP-2268-1.patch, HADOOP-2268-2.patch,
> HADOOP-2268-3.patch
>
>
> See HADOOP-2202 for background on this issue. Arun C. Murthy agrees that when
> possible it is preferable to program against the interface rather than a
> concrete implementation (more flexible, allows for changes of the
> implementation in future etc.) JobControl currently exposes running, waiting,
> ready, successful and dependent jobs as ArrayList rather than List. I propose
> to change this to List.
> I will code up a patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.