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 Re: Small patch
Date Fri, 04 Nov 2011 03:06:21 GMT
And, also TestIOJob fails.

Let me fix now.

Index: src/test/java/org/apache/hama/bsp/TestBSPMasterGroomServer.java
===================================================================
--- src/test/java/org/apache/hama/bsp/TestBSPMasterGroomServer.java	(revision
1197384)
+++ src/test/java/org/apache/hama/bsp/TestBSPMasterGroomServer.java	(working
copy)
@@ -81,7 +81,7 @@
       int tasks) throws Exception {
     for (int i = 0; i < tasks; i++) {
       SequenceFile.Reader reader = new SequenceFile.Reader(fileSys, new Path(
-          TMP_OUTPUT + i), conf);
+          TMP_OUTPUT + "part-0000" +i), conf);
       LongWritable timestamp = new LongWritable();
       Text message = new Text();
       reader.next(timestamp, message);
Index: src/test/java/testjar/ClassSerializePrinting.java
===================================================================
--- src/test/java/testjar/ClassSerializePrinting.java	(revision 1197384)
+++ src/test/java/testjar/ClassSerializePrinting.java	(working copy)
@@ -44,8 +44,9 @@
     private FileSystem fileSys;
     private int num;

-    public void bsp(BSPPeer<NullWritable, NullWritable, NullWritable,
NullWritable> bspPeer) throws IOException,
-        KeeperException, InterruptedException {
+    public void bsp(
+        BSPPeer<NullWritable, NullWritable, NullWritable,
NullWritable> bspPeer)
+        throws IOException, KeeperException, InterruptedException {

       int i = 0;
       for (String otherPeer : bspPeer.getAllPeerNames()) {
@@ -62,8 +63,8 @@

     private void writeLogToFile(String string, int i) throws IOException {
       SequenceFile.Writer writer = SequenceFile.createWriter(fileSys, conf,
-          new Path(TMP_OUTPUT,i+""), LongWritable.class, Text.class,
-          CompressionType.NONE);
+          new Path(TMP_OUTPUT, "part-0000" + i), LongWritable.class,
+          Text.class, CompressionType.NONE);
       writer.append(new LongWritable(System.currentTimeMillis()), new Text(
           "Hello BSP from " + (i + 1) + " of " + num + ": " + string));
       writer.close();

On Fri, Nov 4, 2011 at 11:57 AM, Edward J. Yoon <edwardyoon@apache.org> wrote:
> There's a bug in BSPPeerImpl.
>
> 11/11/04 11:46:55 INFO zookeeper.ClientCnxn: Socket connection
> established to slave.udanax.org/192.168.123.198:2222, initiating
> session
> 11/11/04 11:46:55 INFO bsp.BSPPeerImpl: >>>>>>>>>>
> hdfs://slave.udanax.org:9000/tmp/pi-temp/part-00005
> 11/11/04 11:46:55 WARN bsp.GroomServer: Error running child
> java.lang.NullPointerException
>        at org.apache.hadoop.fs.Path.makeQualified(Path.java:276)
>        at org.apache.hama.bsp.BSPPeerImpl.initialize(BSPPeerImpl.java:190)
>        at org.apache.hama.bsp.BSPPeerImpl.<init>(BSPPeerImpl.java:136)
>        at org.apache.hama.bsp.GroomServer$BSPPeerChild.main(GroomServer.java:906)
> log4j:WARN No appenders could be found for logger
> (org.apache.zookeeper.ClientCnxn).
>
> The dfs should not null.
>
> Index: src/main/java/org/apache/hama/bsp/BSPPeerImpl.java
> ===================================================================
> --- src/main/java/org/apache/hama/bsp/BSPPeerImpl.java  (revision 1197384)
> +++ src/main/java/org/apache/hama/bsp/BSPPeerImpl.java  (working copy)
> @@ -122,11 +122,7 @@
>     this.splitClass = splitClass;
>     this.split = split;
>
> -    FileSystem fs = null;
> -    if (conf.getBoolean("bsp.checkpoint.enabled", false)) {
> -      fs = FileSystem.get(conf);
> -    }
> -    this.dfs = fs;
> +    this.dfs = FileSystem.get(conf);
>
>     String bindAddress = conf.get(Constants.PEER_HOST,
>         Constants.DEFAULT_PEER_HOST);
>
>
> --
> Best Regards, Edward J. Yoon
> @eddieyoon
>



-- 
Best Regards, Edward J. Yoon
@eddieyoon

Mime
View raw message