incubator-hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon" <edwardy...@apache.org>
Subject Small patch.
Date Mon, 14 Nov 2011 08:44:34 GMT
How about we just use getNumBspTask()?

----
Index: src/main/java/org/apache/hama/bsp/BSPJob.java===================================================================---
src/main/java/org/apache/hama/bsp/BSPJob.java	(revision 1200720)+++
src/main/java/org/apache/hama/bsp/BSPJob.java	(working copy)@@ -230,7
+230,8 @@   }    public int getNumBspTask() {-    return
conf.getInt("bsp.peers.num", 0);+    // default is 1, because with
zero, we will hang in infinity+    return conf.getInt("bsp.peers.num",
1);   }    @SuppressWarnings({ "rawtypes" })Index:
src/main/java/org/apache/hama/bsp/JobInProgress.java===================================================================---
src/main/java/org/apache/hama/bsp/JobInProgress.java	(revision
1200720)+++ src/main/java/org/apache/hama/bsp/JobInProgress.java	(working
copy)@@ -101,7 +101,7 @@     this.jobSplit =
job.getConf().get("bsp.job.split.file");          // default is 1,
because with zero, we will hang in infinity-    this.numBSPTasks =
job.getInt("bsp.peers.num", 1);+    this.numBSPTasks =
job.getNumBspTask();       this.profile = new
JobProfile(job.getUser(), jobId, jobFile.toString(),@@ -200,7 +200,7
@@       }       numBSPTasks = splits.length;       LOG.info("num
BSPTasks: " + numBSPTasks);-+             // adjust number of BSP
tasks to actual number of splits       this.tasks = new
TaskInProgress[numBSPTasks];       for (int i = 0; i < numBSPTasks;
i++) {

-- 
Best Regards, Edward J. Yoon
@eddieyoon

Mime
View raw message