You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by tj...@apache.org on 2012/02/09 10:18:41 UTC
svn commit: r1242250 -
/incubator/hama/branches/0.4/core/src/main/java/org/apache/hama/bsp/BSPMaster.java
Author: tjungblut
Date: Thu Feb 9 09:18:41 2012
New Revision: 1242250
URL: http://svn.apache.org/viewvc?rev=1242250&view=rev
Log:
Making error message more accurate
Modified:
incubator/hama/branches/0.4/core/src/main/java/org/apache/hama/bsp/BSPMaster.java
Modified: incubator/hama/branches/0.4/core/src/main/java/org/apache/hama/bsp/BSPMaster.java
URL: http://svn.apache.org/viewvc/incubator/hama/branches/0.4/core/src/main/java/org/apache/hama/bsp/BSPMaster.java?rev=1242250&r1=1242249&r2=1242250&view=diff
==============================================================================
--- incubator/hama/branches/0.4/core/src/main/java/org/apache/hama/bsp/BSPMaster.java (original)
+++ incubator/hama/branches/0.4/core/src/main/java/org/apache/hama/bsp/BSPMaster.java Thu Feb 9 09:18:41 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());