[
https://issues.apache.org/jira/browse/HADOOP-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546344
]
Doug Cutting commented on HADOOP-2268:
--------------------------------------
It would be best to not break code that uses this API.
We should deprecate methods and constructors which take ArrayList as a
parameter and add new versions that take List<Job>. To safely fix methods that
return an ArrayList we need to add a method with a new name that returns
List<Job> and deprecate the old method. So perhaps 'ArrayList
getDependingJobs()' should be deprecated, and we add a new method 'List<Job>
getDependentJobs()'? For consistency, we might also replace addDependingJob
with addDependentJob(). Does this sound reasonable?
I also don't see the need to split this into two issues.
> Job.java should expose jobs as Lists rather than ArrayLists
> -----------------------------------------------------------
>
> 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
>
>
> 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.