YARN-635 and MAPREDUCE-5301. Bug fix as the committed patch ended up being stale.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1489287 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2013-06-04 04:41:55 +00:00
parent a83fb61ac0
commit 5c097a134e
1 changed files with 4 additions and 4 deletions

View File

@ -28,7 +28,7 @@ import org.apache.hadoop.mapreduce.v2.app.MockAppContext;
import org.apache.hadoop.mapreduce.v2.app.job.Job; import org.apache.hadoop.mapreduce.v2.app.job.Job;
import org.apache.hadoop.mapreduce.v2.hs.MockHistoryJobs.JobsPair; import org.apache.hadoop.mapreduce.v2.hs.MockHistoryJobs.JobsPair;
import org.apache.hadoop.mapreduce.v2.hs.webapp.dao.JobsInfo; import org.apache.hadoop.mapreduce.v2.hs.webapp.dao.JobsInfo;
import org.apache.hadoop.yarn.YarnException; import org.apache.hadoop.yarn.YarnRuntimeException;
import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.ApplicationId;
public class MockHistoryContext extends MockAppContext implements HistoryContext { public class MockHistoryContext extends MockAppContext implements HistoryContext {
@ -42,7 +42,7 @@ public class MockHistoryContext extends MockAppContext implements HistoryContext
try { try {
jobs = MockHistoryJobs.newHistoryJobs(numJobs, numTasks, numAttempts); jobs = MockHistoryJobs.newHistoryJobs(numJobs, numTasks, numAttempts);
} catch (IOException e) { } catch (IOException e) {
throw new YarnException(e); throw new YarnRuntimeException(e);
} }
partialJobs = jobs.partial; partialJobs = jobs.partial;
fullJobs = jobs.full; fullJobs = jobs.full;
@ -56,7 +56,7 @@ public class MockHistoryContext extends MockAppContext implements HistoryContext
jobs = MockHistoryJobs.newHistoryJobs(getApplicationID(), numJobs, numTasks, jobs = MockHistoryJobs.newHistoryJobs(getApplicationID(), numJobs, numTasks,
numAttempts); numAttempts);
} catch (IOException e) { } catch (IOException e) {
throw new YarnException(e); throw new YarnRuntimeException(e);
} }
partialJobs = jobs.partial; partialJobs = jobs.partial;
fullJobs = jobs.full; fullJobs = jobs.full;
@ -76,7 +76,7 @@ public class MockHistoryContext extends MockAppContext implements HistoryContext
jobs = MockHistoryJobs.newHistoryJobs(getApplicationID(), numJobs, numTasks, jobs = MockHistoryJobs.newHistoryJobs(getApplicationID(), numJobs, numTasks,
numAttempts, hasFailedTasks); numAttempts, hasFailedTasks);
} catch (IOException e) { } catch (IOException e) {
throw new YarnException(e); throw new YarnRuntimeException(e);
} }
partialJobs = jobs.partial; partialJobs = jobs.partial;
fullJobs = jobs.full; fullJobs = jobs.full;