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 2011/10/13 13:12:20 UTC
svn commit: r1182781 - in
/incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp: BSP.java
LocalBSPRunner.java
Author: tjungblut
Date: Thu Oct 13 11:12:20 2011
New Revision: 1182781
URL: http://svn.apache.org/viewvc?rev=1182781&view=rev
Log:
fixed inconsistency in naming and calls in the local runner
Modified:
incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSP.java
incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java
Modified: incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSP.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSP.java?rev=1182781&r1=1182780&r2=1182781&view=diff
==============================================================================
--- incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSP.java (original)
+++ incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/BSP.java Thu Oct 13 11:12:20 2011
@@ -58,7 +58,7 @@ public abstract class BSP implements BSP
* @param peer Your BSPPeer instance.
*/
@Override
- public void bsp(BSPPeer bspPeer) throws IOException, KeeperException,
+ public void bsp(BSPPeer peer) throws IOException, KeeperException,
InterruptedException {
}
Modified: incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java?rev=1182781&r1=1182780&r2=1182781&view=diff
==============================================================================
--- incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java (original)
+++ incubator/hama/trunk/core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java Thu Oct 13 11:12:20 2011
@@ -101,10 +101,10 @@ public class LocalBSPRunner implements J
@Override
public JobStatus submitJob(BSPJobID jobID, String jobFile) throws IOException {
this.jobFile = jobFile;
-
- if(fs == null)
+
+ if (fs == null)
this.fs = FileSystem.get(conf);
-
+
// add the resource to the current configuration, because add resouce in
// HamaConfigurations constructor (ID,FILE) does not take local->HDFS
// connections into account. This leads to not serializing the
@@ -203,10 +203,12 @@ public class LocalBSPRunner implements J
public void run() {
bsp.setConf(conf);
try {
+ bsp.setup(groom);
bsp.bsp(groom);
} catch (Exception e) {
LOG.error("Exception during BSP execution!", e);
}
+ bsp.cleanup(groom);
}
@Override
@@ -358,5 +360,10 @@ public class LocalBSPRunner implements J
public void put(BSPMessageBundle messages) throws IOException {
}
+ @Override
+ public Configuration getConfiguration() {
+ return conf;
+ }
+
}
}