hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1021597 - in /incubator/hama/trunk: CHANGES.txt src/java/org/apache/hama/bsp/GroomServer.java
Date Tue, 12 Oct 2010 02:44:56 GMT
Author: edwardyoon
Date: Tue Oct 12 02:44:55 2010
New Revision: 1021597

URL: http://svn.apache.org/viewvc?rev=1021597&view=rev
Log:
Redundant use of synchronize keyword

Modified:
    incubator/hama/trunk/CHANGES.txt
    incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java

Modified: incubator/hama/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/CHANGES.txt?rev=1021597&r1=1021596&r2=1021597&view=diff
==============================================================================
--- incubator/hama/trunk/CHANGES.txt (original)
+++ incubator/hama/trunk/CHANGES.txt Tue Oct 12 02:44:55 2010
@@ -168,6 +168,7 @@ Trunk (unreleased changes)
 
   BUG FIXES
   
+    HAMA-305: Redundant use of synchronize keyword (Filipe Manana via edward)
     HAMA-301: Fix unit test fail bug (edwardyoon)
     HAMA-303: slave.host.name is superceded by bsp.peer.hostname 
                 (Filipe Manana via edwardyoon)

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java?rev=1021597&r1=1021596&r2=1021597&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java Tue Oct 12 02:44:55
2010
@@ -274,15 +274,16 @@ public class GroomServer implements Runn
 
   private void startNewTask(LaunchTaskAction action) {
     TaskInProgress tip = new TaskInProgress(action.getTask(), this.groomServerName);
-    synchronized (tip) {
-      try {
-        runningTasks.put(action.getTask().getTaskID(), tip);
-        tip.launchTask();
-      } catch (Throwable ie) {
-        // TODO: when job failed.
-      }
+
+    synchronized (this) {
+      runningTasks.put(action.getTask().getTaskID(), tip);
     }
 
+    try {
+      tip.launchTask();
+    } catch (Throwable ie) {
+      // TODO: when job failed.
+    }
   }
 
   private HeartbeatResponse transmitHeartBeat(long now) throws IOException {



Mime
View raw message