MAPREDUCE-5757. ConcurrentModificationException in JobControl.toList. Contributed by Jason Lowe

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1569038 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason Darrell Lowe 2014-02-17 16:14:58 +00:00
parent a04cb17540
commit 08e6d312e8
2 changed files with 6 additions and 3 deletions

View File

@ -165,6 +165,9 @@ Release 2.4.0 - UNRELEASED
MAPREDUCE-5670. CombineFileRecordReader should report progress when moving
to the next file (Chen He via jlowe)
MAPREDUCE-5757. ConcurrentModificationException in JobControl.toList
(jlowe)
Release 2.3.1 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -79,7 +79,7 @@ public JobControl(String groupName) {
this.runnerState = ThreadState.READY;
}
synchronized private static List<ControlledJob> toList(
private static List<ControlledJob> toList(
LinkedList<ControlledJob> jobs) {
ArrayList<ControlledJob> retv = new ArrayList<ControlledJob>();
for (ControlledJob job : jobs) {
@ -122,11 +122,11 @@ public List<ControlledJob> getReadyJobsList() {
/**
* @return the jobs in the success state
*/
public List<ControlledJob> getSuccessfulJobList() {
synchronized public List<ControlledJob> getSuccessfulJobList() {
return toList(this.successfulJobs);
}
public List<ControlledJob> getFailedJobList() {
synchronized public List<ControlledJob> getFailedJobList() {
return toList(this.failedJobs);
}