incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjungb...@apache.org
Subject svn commit: r1242248 - /incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java
Date Thu, 09 Feb 2012 09:17:53 GMT
Author: tjungblut
Date: Thu Feb  9 09:17:53 2012
New Revision: 1242248

URL: http://svn.apache.org/viewvc?rev=1242248&view=rev
Log:
Making error message more accurate

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

Modified: incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java?rev=1242248&r1=1242247&r2=1242248&view=diff
==============================================================================
--- incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java (original)
+++ incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSPMaster.java Thu Feb  9
09:17:53 2012
@@ -149,10 +149,10 @@ public class BSPMaster implements JobSub
             break;
           }
         }
-        
+
         if (null != tmpStatus) {
           totalTasks += tmpStatus.countTasks();
-          
+
           List<TaskStatus> tlist = tmpStatus.getTaskReports();
           for (TaskStatus ts : tlist) {
             JobInProgress jip = whichJob(ts.getJobId());
@@ -279,6 +279,10 @@ public class BSPMaster implements JobSub
           if (fs == null) {
             fs = FileSystem.get(conf);
           }
+        } catch (IOException e) {
+          LOG.error("Can't get connection to Hadoop Namenode!", e);
+        }
+        try {
           // clean up the system dir, which will only work if hdfs is out of
           // safe mode
           if (systemDir == null) {
@@ -492,8 +496,10 @@ public class BSPMaster implements JobSub
       for (String node : zk.getChildren(bspRoot, this)) {
         for (String subnode : zk.getChildren(bspRoot + "/" + node, this)) {
           for (String subnode2 : zk.getChildren(bspRoot + "/" + node, this)) {
-            for (String subnode3 : zk.getChildren(bspRoot + "/" + node + "/" + subnode2,
this)) {
-              zk.delete(bspRoot + "/" + node + "/" + subnode + "/" + subnode2 + "/" + subnode3,
0);
+            for (String subnode3 : zk.getChildren(bspRoot + "/" + node + "/"
+                + subnode2, this)) {
+              zk.delete(bspRoot + "/" + node + "/" + subnode + "/" + subnode2
+                  + "/" + subnode3, 0);
             }
             zk.delete(bspRoot + "/" + node + "/" + subnode + "/" + subnode2, 0);
           }
@@ -639,7 +645,8 @@ public class BSPMaster implements JobSub
       for (Map.Entry<GroomServerStatus, GroomProtocol> entry : groomServers
           .entrySet()) {
         GroomServerStatus s = entry.getKey();
-        groomsMap.put(s.getGroomHostName() + ":" + Constants.DEFAULT_PEER_PORT, s);
+        groomsMap.put(s.getGroomHostName() + ":" + Constants.DEFAULT_PEER_PORT,
+            s);
       }
     }
 
@@ -738,7 +745,7 @@ public class BSPMaster implements JobSub
 
       status.setStartTime(jip.getStartTime());
       status.setNumOfTasks(jip.getNumOfTasks());
-      
+
       // Sets the user name
       status.setUsername(jip.getProfile().getUser());
       status.setName(jip.getJobName());



Mime
View raw message