You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by ed...@apache.org on 2010/11/11 10:16:58 UTC

svn commit: r1033849 - /incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMaster.java

Author: edwardyoon
Date: Thu Nov 11 09:16:56 2010
New Revision: 1033849

URL: http://svn.apache.org/viewvc?rev=1033849&view=rev
Log:
Trivial changes of re-factoring.

Modified:
    incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMaster.java

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMaster.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMaster.java?rev=1033849&r1=1033848&r2=1033849&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMaster.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMaster.java Thu Nov 11 09:16:56 2010
@@ -233,8 +233,7 @@ public class BSPMaster implements JobSub
   public static BSPMaster startTracker(HamaConfiguration conf, String identifier)
       throws IOException, InterruptedException {
 
-    BSPMaster result = null;
-    result = new BSPMaster(conf, identifier);
+    BSPMaster result = new BSPMaster(conf, identifier);
     result.taskScheduler.setGroomServerManager(result);
 
     return result;
@@ -247,16 +246,12 @@ public class BSPMaster implements JobSub
     return NetUtils.createSocketAddr(hamaMasterStr, defaultPort);
   }
 
-  private static SimpleDateFormat getDateFormat() {
-    return new SimpleDateFormat("yyyyMMddHHmm");
-  }
-
   /**
    * 
    * @return
    */
   private static String generateNewIdentifier() {
-    return getDateFormat().format(new Date());
+    return new SimpleDateFormat("yyyyMMddHHmm").format(new Date());
   }
 
   public void offerService() throws InterruptedException, IOException {
@@ -369,8 +364,6 @@ public class BSPMaster implements JobSub
     HeartbeatResponse response = new HeartbeatResponse(newResponseId, null, groomServerPeers);
     List<GroomServerAction> actions = new ArrayList<GroomServerAction>();
 
-    updateTaskStatuses(status);
-
     // Check for new tasks to be executed on the groom server
     if (acceptNewTasks) {
       GroomServerStatus groomStatus = getGroomServer(groomName);
@@ -391,7 +384,8 @@ public class BSPMaster implements JobSub
 
     groomToHeartbeatResponseMap.put(groomName, response);
     removeMarkedTasks(groomName);
-
+    updateTaskStatuses(status);
+    
     return response;
   }