MAPREDUCE-3203. Fix some javac warnings in MRAppMaster. (mahadev) - Merging r1185909 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1185910 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mahadev Konar 2011-10-18 22:48:09 +00:00
parent 27317bc221
commit a9fe990f7b
2 changed files with 10 additions and 2 deletions

View File

@ -1624,6 +1624,8 @@ Release 0.23.0 - Unreleased
MAPREDUCE-3165. Ensure logging options are set correctly for MR AM and MAPREDUCE-3165. Ensure logging options are set correctly for MR AM and
tasks. (todd via acmurthy) tasks. (todd via acmurthy)
MAPREDUCE-3203. Fix some javac warnings in MRAppMaster. (mahadev)
Release 0.22.0 - Unreleased Release 0.22.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -38,7 +38,6 @@ import org.apache.hadoop.mapred.LocalContainerLauncher;
import org.apache.hadoop.mapred.TaskAttemptListenerImpl; import org.apache.hadoop.mapred.TaskAttemptListenerImpl;
import org.apache.hadoop.mapred.TaskUmbilicalProtocol; import org.apache.hadoop.mapred.TaskUmbilicalProtocol;
import org.apache.hadoop.mapreduce.MRJobConfig; import org.apache.hadoop.mapreduce.MRJobConfig;
import org.apache.hadoop.mapreduce.jobhistory.JobFinishedEvent;
import org.apache.hadoop.mapreduce.jobhistory.JobHistoryEvent; import org.apache.hadoop.mapreduce.jobhistory.JobHistoryEvent;
import org.apache.hadoop.mapreduce.jobhistory.JobHistoryEventHandler; import org.apache.hadoop.mapreduce.jobhistory.JobHistoryEventHandler;
import org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager; import org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager;
@ -110,6 +109,7 @@ import org.apache.hadoop.yarn.util.ConverterUtils;
* The information is shared across different components using AppContext. * The information is shared across different components using AppContext.
*/ */
@SuppressWarnings("deprecation")
public class MRAppMaster extends CompositeService { public class MRAppMaster extends CompositeService {
private static final Log LOG = LogFactory.getLog(MRAppMaster.class); private static final Log LOG = LogFactory.getLog(MRAppMaster.class);
@ -262,7 +262,7 @@ public class MRAppMaster extends CompositeService {
return; return;
} }
Path jobTempDirPath = new Path(jobTempDir); Path jobTempDirPath = new Path(jobTempDir);
LOG.info("Deleting staging directory " + fs.getDefaultUri(getConfig()) + LOG.info("Deleting staging directory " + FileSystem.getDefaultUri(getConfig()) +
" " + jobTempDir); " " + jobTempDir);
fs.delete(jobTempDirPath, true); fs.delete(jobTempDirPath, true);
} }
@ -596,6 +596,7 @@ public class MRAppMaster extends CompositeService {
return jobs; return jobs;
} }
@SuppressWarnings("rawtypes")
@Override @Override
public EventHandler getEventHandler() { public EventHandler getEventHandler() {
return dispatcher.getEventHandler(); return dispatcher.getEventHandler();
@ -612,6 +613,7 @@ public class MRAppMaster extends CompositeService {
} }
} }
@SuppressWarnings("unchecked")
@Override @Override
public void start() { public void start() {
@ -665,6 +667,7 @@ public class MRAppMaster extends CompositeService {
* In a typical workflow, one presumably would want to uberize only a subset * In a typical workflow, one presumably would want to uberize only a subset
* of the jobs (the "small" ones), which is awkward with the current design. * of the jobs (the "small" ones), which is awkward with the current design.
*/ */
@SuppressWarnings("unchecked")
protected void startJobs() { protected void startJobs() {
/** create a job-start event to get this ball rolling */ /** create a job-start event to get this ball rolling */
JobEvent startJobEvent = new JobEvent(job.getID(), JobEventType.JOB_START); JobEvent startJobEvent = new JobEvent(job.getID(), JobEventType.JOB_START);
@ -673,6 +676,7 @@ public class MRAppMaster extends CompositeService {
} }
private class JobEventDispatcher implements EventHandler<JobEvent> { private class JobEventDispatcher implements EventHandler<JobEvent> {
@SuppressWarnings("unchecked")
@Override @Override
public void handle(JobEvent event) { public void handle(JobEvent event) {
((EventHandler<JobEvent>)context.getJob(event.getJobId())).handle(event); ((EventHandler<JobEvent>)context.getJob(event.getJobId())).handle(event);
@ -680,6 +684,7 @@ public class MRAppMaster extends CompositeService {
} }
private class TaskEventDispatcher implements EventHandler<TaskEvent> { private class TaskEventDispatcher implements EventHandler<TaskEvent> {
@SuppressWarnings("unchecked")
@Override @Override
public void handle(TaskEvent event) { public void handle(TaskEvent event) {
Task task = context.getJob(event.getTaskID().getJobId()).getTask( Task task = context.getJob(event.getTaskID().getJobId()).getTask(
@ -690,6 +695,7 @@ public class MRAppMaster extends CompositeService {
private class TaskAttemptEventDispatcher private class TaskAttemptEventDispatcher
implements EventHandler<TaskAttemptEvent> { implements EventHandler<TaskAttemptEvent> {
@SuppressWarnings("unchecked")
@Override @Override
public void handle(TaskAttemptEvent event) { public void handle(TaskAttemptEvent event) {
Job job = context.getJob(event.getTaskAttemptID().getTaskId().getJobId()); Job job = context.getJob(event.getTaskAttemptID().getTaskId().getJobId());