hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r1130361 - in /hadoop/mapreduce/branches/MR-279: ./ yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/
Date Thu, 02 Jun 2011 00:15:30 GMT
Author: mahadev
Date: Thu Jun  2 00:15:30 2011
New Revision: 1130361

URL: http://svn.apache.org/viewvc?rev=1130361&view=rev
Log:
Fix a deadlock in the resourcemanager. (mahadev)

Modified:
    hadoop/mapreduce/branches/MR-279/CHANGES.txt
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java

Modified: hadoop/mapreduce/branches/MR-279/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/CHANGES.txt?rev=1130361&r1=1130360&r2=1130361&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/MR-279/CHANGES.txt Thu Jun  2 00:15:30 2011
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
 
     MAPREDUCE-279
+
+    Fix a deadlock in the resourcemanager. (mahadev)
    
     Fix for NPE in TestRMNMRPCResponseId. (mahadev)
 

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java?rev=1130361&r1=1130360&r2=1130361&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java
Thu Jun  2 00:15:30 2011
@@ -61,6 +61,7 @@ public class ApplicationMasterInfo imple
   private final ApplicationSubmissionContext submissionContext;
   private ApplicationMaster master;
   private final EventHandler handler;
+  /** only to be used during recovery **/
   private final EventHandler syncHandler;
   private Container masterContainer;
   final private String user;
@@ -449,7 +450,7 @@ public class ApplicationMasterInfo imple
     public void transition(ApplicationMasterInfo masterInfo,
     ASMEvent<ApplicationEventType> event) {
       /* notify tracking applications that an applicaiton has been added */
-      masterInfo.syncHandler.handle(new ASMEvent<ApplicationTrackerEventType>(
+      masterInfo.handler.handle(new ASMEvent<ApplicationTrackerEventType>(
         ApplicationTrackerEventType.ADD, masterInfo));
       
       /* schedule for a slot */

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java?rev=1130361&r1=1130360&r2=1130361&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java
Thu Jun  2 00:15:30 2011
@@ -131,7 +131,7 @@ public class ApplicationsManagerImpl ext
   }
 
   @Override
-  public synchronized void init(Configuration conf) {
+  public  void init(Configuration conf) {
     addIfService(createNewApplicationMasterLauncher(applicationTokenSecretManager));
     addIfService(createNewSchedulerNegotiator(scheduler));
     this.amTracker = createNewAMTracker();
@@ -142,12 +142,12 @@ public class ApplicationsManagerImpl ext
   }
 
   @Override
-  public synchronized void start() {
+  public void start() {
     super.start();
   }
 
   @Override
-  public synchronized ApplicationMaster getApplicationMaster(ApplicationId applicationId)
{
+  public ApplicationMaster getApplicationMaster(ApplicationId applicationId) {
     ApplicationMaster appMaster =
       amTracker.get(applicationId).getMaster();
     //TODO NPE (When the RM is restarted - it doesn't know about previous AMs)
@@ -164,7 +164,7 @@ public class ApplicationsManagerImpl ext
   }
 
   @Override
-  public synchronized void submitApplication(ApplicationSubmissionContext context)
+  public  void submitApplication(ApplicationSubmissionContext context)
   throws IOException {
     String user;
     ApplicationId applicationId = context.getApplicationId();
@@ -208,7 +208,7 @@ public class ApplicationsManagerImpl ext
   }
 
   @Override
-  public synchronized void finishApplicationMaster(ApplicationMaster applicationMaster)
+  public void finishApplicationMaster(ApplicationMaster applicationMaster)
   throws IOException {
     amTracker.finish(applicationMaster.getApplicationId());
   }
@@ -243,23 +243,23 @@ public class ApplicationsManagerImpl ext
   }
 
   @Override
-  public synchronized void applicationHeartbeat(ApplicationStatus status) 
+  public  void applicationHeartbeat(ApplicationStatus status) 
   throws IOException {
     amTracker.heartBeat(status);
   }
 
   @Override
-  public synchronized void registerApplicationMaster(ApplicationMaster applicationMaster)
+  public  void registerApplicationMaster(ApplicationMaster applicationMaster)
   throws IOException {
     amTracker.registerMaster(applicationMaster);
  }
 
   @Override
-  public synchronized List<AppContext> getAllApplications() {
+  public  List<AppContext> getAllApplications() {
     return amTracker.getAllApplications();
   }
 
-  public synchronized ApplicationMasterInfo getApplicationMasterInfo(ApplicationId
+  public  ApplicationMasterInfo getApplicationMasterInfo(ApplicationId
       applicationId) {
     return amTracker.get(applicationId);
   }



Mime
View raw message