From b4d20c707af6fe8b9b3e5ffa95a88012a1cdfc17 Mon Sep 17 00:00:00 2001 From: Mahadev Konar Date: Tue, 18 Oct 2011 22:46:42 +0000 Subject: [PATCH] MAPREDUCE-3203. Fix some javac warnings in MRAppMaster. (mahadev) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1185909 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 2 ++ .../apache/hadoop/mapreduce/v2/app/MRAppMaster.java | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index f7640a90b4..77cf39e8d4 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -1672,6 +1672,8 @@ Release 0.23.0 - Unreleased MAPREDUCE-3165. Ensure logging options are set correctly for MR AM and tasks. (todd via acmurthy) + MAPREDUCE-3203. Fix some javac warnings in MRAppMaster. (mahadev) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java index df4f5cd1f5..94db4265ff 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/MRAppMaster.java @@ -38,7 +38,6 @@ import org.apache.hadoop.mapred.TaskAttemptListenerImpl; import org.apache.hadoop.mapred.TaskUmbilicalProtocol; 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.JobHistoryEventHandler; import org.apache.hadoop.mapreduce.security.token.JobTokenSecretManager; @@ -110,6 +109,7 @@ * The information is shared across different components using AppContext. */ +@SuppressWarnings("deprecation") public class MRAppMaster extends CompositeService { private static final Log LOG = LogFactory.getLog(MRAppMaster.class); @@ -262,7 +262,7 @@ public void cleanupStagingDir() throws IOException { return; } Path jobTempDirPath = new Path(jobTempDir); - LOG.info("Deleting staging directory " + fs.getDefaultUri(getConfig()) + + LOG.info("Deleting staging directory " + FileSystem.getDefaultUri(getConfig()) + " " + jobTempDir); fs.delete(jobTempDirPath, true); } @@ -596,6 +596,7 @@ public Map getAllJobs() { return jobs; } + @SuppressWarnings("rawtypes") @Override public EventHandler getEventHandler() { return dispatcher.getEventHandler(); @@ -612,6 +613,7 @@ public Clock getClock() { } } + @SuppressWarnings("unchecked") @Override public void start() { @@ -665,6 +667,7 @@ public void start() { * 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. */ + @SuppressWarnings("unchecked") protected void startJobs() { /** create a job-start event to get this ball rolling */ JobEvent startJobEvent = new JobEvent(job.getID(), JobEventType.JOB_START); @@ -673,6 +676,7 @@ protected void startJobs() { } private class JobEventDispatcher implements EventHandler { + @SuppressWarnings("unchecked") @Override public void handle(JobEvent event) { ((EventHandler)context.getJob(event.getJobId())).handle(event); @@ -680,6 +684,7 @@ public void handle(JobEvent event) { } private class TaskEventDispatcher implements EventHandler { + @SuppressWarnings("unchecked") @Override public void handle(TaskEvent event) { Task task = context.getJob(event.getTaskID().getJobId()).getTask( @@ -690,6 +695,7 @@ public void handle(TaskEvent event) { private class TaskAttemptEventDispatcher implements EventHandler { + @SuppressWarnings("unchecked") @Override public void handle(TaskAttemptEvent event) { Job job = context.getJob(event.getTaskAttemptID().getTaskId().getJobId());