incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1151771 [2/3] - in /incubator/hama/trunk: ./ bin/ conf/ src/docs/ src/docs/src/documentation/ src/docs/src/documentation/classes/ src/docs/src/documentation/content/xdocs/ src/docs/src/documentation/content/xdocs/docs/r0.2.0/ src/docs/src/...
Date Thu, 28 Jul 2011 09:28:10 GMT
Propchange: incubator/hama/trunk/src/java/org/apache/hama/BSPMasterRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/Constants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/GroomServerRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/HamaConfiguration.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/MiniZooKeeperCluster.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/ZooKeeperRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSP.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJob.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobClient.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPJobID.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMaster.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPMessageBundle.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeerInterface.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPTask.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPTaskRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/BooleanMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/ByteMessage.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/ByteMessage.java?rev=1151771&r1=1151770&r2=1151771&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/ByteMessage.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/ByteMessage.java Thu Jul 28 09:28:02 2011
@@ -1,68 +1,68 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hama.bsp;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * A message that consists of a byte tag and a byte data.
- */
-public class ByteMessage extends BSPMessage {
-
-  private byte[] tag;
-  private byte[] data;
-
-  public ByteMessage() {
-    super();
-  }
-
-  public ByteMessage(byte[] tag, byte[] data) {
-    super();
-    this.tag = tag;
-    this.data = data;
-  }
-
-  @Override
-  public byte[] getTag() {
-    return this.tag;
-  }
-
-  @Override
-  public byte[] getData() {
-    return this.data;
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    this.tag = new byte[in.readInt()];
-    in.readFully(tag, 0, this.tag.length);
-    this.data = new byte[in.readInt()];
-    in.readFully(data, 0, this.data.length);
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.writeInt(tag.length);
-    out.write(tag);
-    out.writeInt(data.length);
-    out.write(data);
-  }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.bsp;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * A message that consists of a byte tag and a byte data.
+ */
+public class ByteMessage extends BSPMessage {
+
+  private byte[] tag;
+  private byte[] data;
+
+  public ByteMessage() {
+    super();
+  }
+
+  public ByteMessage(byte[] tag, byte[] data) {
+    super();
+    this.tag = tag;
+    this.data = data;
+  }
+
+  @Override
+  public byte[] getTag() {
+    return this.tag;
+  }
+
+  @Override
+  public byte[] getData() {
+    return this.data;
+  }
+
+  @Override
+  public void readFields(DataInput in) throws IOException {
+    this.tag = new byte[in.readInt()];
+    in.readFully(tag, 0, this.tag.length);
+    this.data = new byte[in.readInt()];
+    in.readFully(data, 0, this.data.length);
+  }
+
+  @Override
+  public void write(DataOutput out) throws IOException {
+    out.writeInt(tag.length);
+    out.write(tag);
+    out.writeInt(data.length);
+    out.write(data);
+  }
+
+}

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/ByteMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/ClusterStatus.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/CommitTaskAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/Directive.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/DirectiveException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/DirectiveHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/DispatchTasksDirective.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/DoubleMessage.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/DoubleMessage.java?rev=1151771&r1=1151770&r2=1151771&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/DoubleMessage.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/DoubleMessage.java Thu Jul 28 09:28:02 2011
@@ -1,64 +1,64 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hama.bsp;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * A message that consists of a string tag and a double data. 
- */
-public class DoubleMessage extends BSPMessage {
-
-  private String tag;
-  private double data;
-
-  public DoubleMessage() {
-    super();
-  }
-
-  public DoubleMessage(String tag, double data) {
-    super();
-    this.data = data;
-    this.tag = tag;
-  }
-
-  @Override
-  public String getTag() {
-    return tag;
-  }
-
-  @Override
-  public Double getData() {
-    return data;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.writeUTF(tag);
-    out.writeDouble(data);
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    tag = in.readUTF();
-    data = in.readDouble();
-  }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.bsp;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * A message that consists of a string tag and a double data. 
+ */
+public class DoubleMessage extends BSPMessage {
+
+  private String tag;
+  private double data;
+
+  public DoubleMessage() {
+    super();
+  }
+
+  public DoubleMessage(String tag, double data) {
+    super();
+    this.data = data;
+    this.tag = tag;
+  }
+
+  @Override
+  public String getTag() {
+    return tag;
+  }
+
+  @Override
+  public Double getData() {
+    return data;
+  }
+
+  @Override
+  public void write(DataOutput out) throws IOException {
+    out.writeUTF(tag);
+    out.writeDouble(data);
+  }
+
+  @Override
+  public void readFields(DataInput in) throws IOException {
+    tag = in.readUTF();
+    data = in.readDouble();
+  }
+
+}

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/DoubleMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/FCFSQueue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServerAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServerManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/GroomServerStatus.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/ID.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/IntegerDoubleMessage.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/IntegerDoubleMessage.java?rev=1151771&r1=1151770&r2=1151771&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/IntegerDoubleMessage.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/IntegerDoubleMessage.java Thu Jul 28 09:28:02 2011
@@ -1,64 +1,64 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hama.bsp;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-/**
- * A message that consists of a int tag and a double data. 
- */
-public class IntegerDoubleMessage extends BSPMessage {
-
-  int tag;
-  double data;
-
-  public IntegerDoubleMessage() {
-    super();
-  }
-
-  public IntegerDoubleMessage(int tag, double data) {
-    super();
-    this.tag = tag;
-    this.data = data;
-  }
-
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.writeInt(tag);
-    out.writeDouble(data);
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    tag = in.readInt();
-    data = in.readDouble();
-  }
-
-  @Override
-  public Integer getTag() {
-    return tag;
-  }
-
-  @Override
-  public Double getData() {
-    return data;
-  }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.bsp;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+/**
+ * A message that consists of a int tag and a double data. 
+ */
+public class IntegerDoubleMessage extends BSPMessage {
+
+  int tag;
+  double data;
+
+  public IntegerDoubleMessage() {
+    super();
+  }
+
+  public IntegerDoubleMessage(int tag, double data) {
+    super();
+    this.tag = tag;
+    this.data = data;
+  }
+
+  @Override
+  public void write(DataOutput out) throws IOException {
+    out.writeInt(tag);
+    out.writeDouble(data);
+  }
+
+  @Override
+  public void readFields(DataInput in) throws IOException {
+    tag = in.readInt();
+    data = in.readDouble();
+  }
+
+  @Override
+  public Integer getTag() {
+    return tag;
+  }
+
+  @Override
+  public Double getData() {
+    return data;
+  }
+
+}

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/IntegerDoubleMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/IntegerMessage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/JobChangeEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/JobInProgress.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/JobInProgressListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/JobProfile.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/JobStatus.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/KillJobAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/KillTaskAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/LaunchTaskAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/LocalBSPRunner.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/LocalBSPRunner.java?rev=1151771&r1=1151770&r2=1151771&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/LocalBSPRunner.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/LocalBSPRunner.java Thu Jul 28 09:28:02 2011
@@ -1,356 +1,356 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hama.bsp;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.BrokenBarrierException;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.CyclicBarrier;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.ThreadPoolExecutor;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.util.ReflectionUtils;
-import org.apache.hama.bsp.BSPMaster.State;
-import org.apache.hama.ipc.JobSubmissionProtocol;
-import org.apache.zookeeper.KeeperException;
-
-/**
- * A multithreaded local BSP runner that can be used for debugging BSP's. It
- * uses the working directory "/user/hama/bsp/" and starts runners based on the
- * number of the machines core.
- * 
- */
-public class LocalBSPRunner implements JobSubmissionProtocol {
-  public static final Log LOG = LogFactory.getLog(LocalBSPRunner.class);
-
-  private static final String IDENTIFIER = "localrunner";
-  private static String WORKING_DIR = "/user/hama/bsp/";
-  protected static volatile ThreadPoolExecutor threadPool;
-  protected static int threadPoolSize;
-  protected static final LinkedList<Future<BSP>> futureList = new LinkedList<Future<BSP>>();
-  protected static CyclicBarrier barrier;
-
-  static {
-    threadPoolSize = Runtime.getRuntime().availableProcessors();
-    barrier = new CyclicBarrier(threadPoolSize);
-    threadPool = (ThreadPoolExecutor) Executors
-        .newFixedThreadPool(threadPoolSize);
-  }
-
-  protected HashMap<String, LocalGroom> localGrooms = new HashMap<String, LocalGroom>();
-  protected String jobFile;
-  protected String jobName;
-
-  protected JobStatus currentJobStatus;
-
-  protected Configuration conf;
-  protected FileSystem fs;
-
-  public LocalBSPRunner(Configuration conf) throws IOException {
-    super();
-    this.conf = conf;
-    this.fs = FileSystem.get(conf);
-    String path = conf.get("bsp.local.dir");
-    if (path != null && !path.isEmpty())
-      WORKING_DIR = path;
-
-    threadPoolSize = conf.getInt("bsp.local.tasks.maximum", 20);
-    threadPool = (ThreadPoolExecutor) Executors
-        .newFixedThreadPool(threadPoolSize);
-    barrier = new CyclicBarrier(threadPoolSize);
-
-    for (int i = 0; i < threadPoolSize; i++) {
-      String name = IDENTIFIER + " " + i;
-      localGrooms.put(name, new LocalGroom(name));
-    }
-
-  }
-
-  @Override
-  public long getProtocolVersion(String protocol, long clientVersion)
-      throws IOException {
-    return 3;
-  }
-
-  @Override
-  public BSPJobID getNewJobId() throws IOException {
-    return new BSPJobID(IDENTIFIER, 1);
-  }
-
-  @Override
-  public JobStatus submitJob(BSPJobID jobID, String jobFile) throws IOException {
-    this.jobFile = jobFile;
-    BSPJob job = new BSPJob(jobID, jobFile);
-    job.setNumBspTask(threadPoolSize);
-    this.jobName = job.getJobName();
-    currentJobStatus = new JobStatus(jobID, System.getProperty("user.name"), 0,
-        JobStatus.RUNNING);
-    for (int i = 0; i < threadPoolSize; i++) {
-      String name = IDENTIFIER + " " + i;
-      LocalGroom localGroom = new LocalGroom(name);
-      localGrooms.put(name, localGroom);
-      futureList.add(threadPool.submit(new BSPRunner(conf, job, ReflectionUtils
-          .newInstance(job.getBspClass(), conf), localGroom)));
-    }
-    new Thread(new ThreadObserver(currentJobStatus)).start();
-    return currentJobStatus;
-  }
-
-  @Override
-  public ClusterStatus getClusterStatus(boolean detailed) throws IOException {
-    Map<String, String> map = new HashMap<String, String>();
-    for (Entry<String, LocalGroom> entry : localGrooms.entrySet()) {
-      map.put(entry.getKey(), entry.getValue().getPeerName());
-    }
-    return new ClusterStatus(map, threadPoolSize, threadPoolSize, State.RUNNING);
-  }
-
-  @Override
-  public JobProfile getJobProfile(BSPJobID jobid) throws IOException {
-    return new JobProfile(System.getProperty("user.name"), jobid, jobFile,
-        jobName);
-  }
-
-  @Override
-  public JobStatus getJobStatus(BSPJobID jobid) throws IOException {
-    if (currentJobStatus == null) {
-      currentJobStatus = new JobStatus(jobid, System.getProperty("user.name"),
-          0L, JobStatus.RUNNING);
-    }
-    return currentJobStatus;
-  }
-
-  @Override
-  public String getFilesystemName() throws IOException {
-    return fs.getUri().toString();
-  }
-
-  @Override
-  public JobStatus[] jobsToComplete() throws IOException {
-    return null;
-  }
-
-  @Override
-  public JobStatus[] getAllJobs() throws IOException {
-    return null;
-  }
-
-  @Override
-  public String getSystemDir() {
-    return WORKING_DIR;
-  }
-
-  @Override
-  public void killJob(BSPJobID jobid) throws IOException {
-    return;
-  }
-
-  @Override
-  public boolean killTask(TaskAttemptID taskId, boolean shouldFail)
-      throws IOException {
-    return false;
-  }
-
-  // this class will spawn a new thread and executes the BSP
-  class BSPRunner implements Callable<BSP> {
-
-    Configuration conf;
-    BSPJob job;
-    BSP bsp;
-    LocalGroom groom;
-
-    public BSPRunner(Configuration conf, BSPJob job, BSP bsp, LocalGroom groom) {
-      super();
-      this.conf = conf;
-      this.job = job;
-      this.bsp = bsp;
-      this.groom = groom;
-    }
-
-    public void run() {
-      bsp.setConf(conf);
-      try {
-         bsp.bsp(groom);
-      } catch (Exception e) {
-        LOG.error("Exception during BSP execution!", e);
-      }
-    }
-
-    @Override
-    public BSP call() throws Exception {
-      run();
-      return bsp;
-    }
-  }
-
-  // this thread observes the status of the runners.
-  class ThreadObserver implements Runnable {
-
-    JobStatus status;
-
-    public ThreadObserver(JobStatus currentJobStatus) {
-      this.status = currentJobStatus;
-    }
-
-    @Override
-    public void run() {
-      boolean success = true;
-      for (Future<BSP> future : futureList) {
-        try {
-          future.get();
-        } catch (InterruptedException e) {
-          LOG.error("Exception during BSP execution!", e);
-          success = false;
-        } catch (ExecutionException e) {
-          LOG.error("Exception during BSP execution!", e);
-          success = false;
-        }
-      }
-      if (success) {
-        currentJobStatus.setState(JobStatus.State.SUCCEEDED);
-        currentJobStatus.setRunState(JobStatus.SUCCEEDED);
-      } else {
-        currentJobStatus.setState(JobStatus.State.FAILED);
-        currentJobStatus.setRunState(JobStatus.FAILED);
-      }
-      threadPool.shutdownNow();
-    }
-
-  }
-
-  class LocalGroom extends BSPPeer {
-    private long superStepCount = 0;
-    private final ConcurrentLinkedQueue<BSPMessage> localMessageQueue = new ConcurrentLinkedQueue<BSPMessage>();
-    // outgoing queue
-    private final Map<String, ConcurrentLinkedQueue<BSPMessage>> outgoingQueues = new ConcurrentHashMap<String, ConcurrentLinkedQueue<BSPMessage>>();
-    private final String peerName;
-
-    public LocalGroom(String peerName) throws IOException {
-      this.peerName = peerName;
-    }
-
-    @Override
-    public void send(String peerName, BSPMessage msg) throws IOException {
-      if (this.peerName.equals(peerName)) {
-        put(msg);
-      } else {
-        // put this into a outgoing queue
-        if (outgoingQueues.get(peerName) == null) {
-          outgoingQueues.put(peerName, new ConcurrentLinkedQueue<BSPMessage>());
-        }
-        outgoingQueues.get(peerName).add(msg);
-      }
-    }
-
-    @Override
-    public void put(BSPMessage msg) throws IOException {
-      localMessageQueue.add(msg);
-    }
-
-    @Override
-    public BSPMessage getCurrentMessage() throws IOException {
-      return localMessageQueue.poll();
-    }
-
-    @Override
-    public int getNumCurrentMessages() {
-      return localMessageQueue.size();
-    }
-
-    @Override
-    public void sync() throws IOException, KeeperException,
-        InterruptedException {
-      // wait until all threads reach this barrier
-      barrierSync();
-      // send the messages
-      for (Entry<String, ConcurrentLinkedQueue<BSPMessage>> entry : outgoingQueues
-          .entrySet()) {
-        String peerName = entry.getKey();
-        for (BSPMessage msg : entry.getValue())
-          localGrooms.get(peerName).put(msg);
-      }
-      // clear the local outgoing queue
-      outgoingQueues.clear();
-      // sync again to avoid data inconsistency
-      barrierSync();
-      incrementSuperSteps();
-    }
-
-    private void barrierSync() throws InterruptedException {
-      try {
-        barrier.await();
-      } catch (BrokenBarrierException e) {
-        throw new InterruptedException("Barrier has been broken!" + e);
-      }
-    }
-
-    private void incrementSuperSteps() {
-      currentJobStatus.setprogress(superStepCount++);
-      currentJobStatus.setSuperstepCount(currentJobStatus.progress());
-    }
-
-    @Override
-    public long getSuperstepCount() {
-      return superStepCount;
-    }
-
-    @Override
-    public String getPeerName() {
-      return peerName;
-    }
-
-    @Override
-    public String[] getAllPeerNames() {
-      return localGrooms.keySet().toArray(
-          new String[localGrooms.keySet().size()]);
-    }
-
-    @Override
-    public void clear() {
-      localMessageQueue.clear();
-    }
-
-    @Override
-    public long getProtocolVersion(String protocol, long clientVersion)
-        throws IOException {
-      return 3;
-    }
-
-    @Override
-    public void close() throws IOException {
-
-    }
-
-    @Override
-    public void put(BSPMessageBundle messages) throws IOException {
-    }
-
-  }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.bsp;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+import java.util.concurrent.ThreadPoolExecutor;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.util.ReflectionUtils;
+import org.apache.hama.bsp.BSPMaster.State;
+import org.apache.hama.ipc.JobSubmissionProtocol;
+import org.apache.zookeeper.KeeperException;
+
+/**
+ * A multithreaded local BSP runner that can be used for debugging BSP's. It
+ * uses the working directory "/user/hama/bsp/" and starts runners based on the
+ * number of the machines core.
+ * 
+ */
+public class LocalBSPRunner implements JobSubmissionProtocol {
+  public static final Log LOG = LogFactory.getLog(LocalBSPRunner.class);
+
+  private static final String IDENTIFIER = "localrunner";
+  private static String WORKING_DIR = "/user/hama/bsp/";
+  protected static volatile ThreadPoolExecutor threadPool;
+  protected static int threadPoolSize;
+  protected static final LinkedList<Future<BSP>> futureList = new LinkedList<Future<BSP>>();
+  protected static CyclicBarrier barrier;
+
+  static {
+    threadPoolSize = Runtime.getRuntime().availableProcessors();
+    barrier = new CyclicBarrier(threadPoolSize);
+    threadPool = (ThreadPoolExecutor) Executors
+        .newFixedThreadPool(threadPoolSize);
+  }
+
+  protected HashMap<String, LocalGroom> localGrooms = new HashMap<String, LocalGroom>();
+  protected String jobFile;
+  protected String jobName;
+
+  protected JobStatus currentJobStatus;
+
+  protected Configuration conf;
+  protected FileSystem fs;
+
+  public LocalBSPRunner(Configuration conf) throws IOException {
+    super();
+    this.conf = conf;
+    this.fs = FileSystem.get(conf);
+    String path = conf.get("bsp.local.dir");
+    if (path != null && !path.isEmpty())
+      WORKING_DIR = path;
+
+    threadPoolSize = conf.getInt("bsp.local.tasks.maximum", 20);
+    threadPool = (ThreadPoolExecutor) Executors
+        .newFixedThreadPool(threadPoolSize);
+    barrier = new CyclicBarrier(threadPoolSize);
+
+    for (int i = 0; i < threadPoolSize; i++) {
+      String name = IDENTIFIER + " " + i;
+      localGrooms.put(name, new LocalGroom(name));
+    }
+
+  }
+
+  @Override
+  public long getProtocolVersion(String protocol, long clientVersion)
+      throws IOException {
+    return 3;
+  }
+
+  @Override
+  public BSPJobID getNewJobId() throws IOException {
+    return new BSPJobID(IDENTIFIER, 1);
+  }
+
+  @Override
+  public JobStatus submitJob(BSPJobID jobID, String jobFile) throws IOException {
+    this.jobFile = jobFile;
+    BSPJob job = new BSPJob(jobID, jobFile);
+    job.setNumBspTask(threadPoolSize);
+    this.jobName = job.getJobName();
+    currentJobStatus = new JobStatus(jobID, System.getProperty("user.name"), 0,
+        JobStatus.RUNNING);
+    for (int i = 0; i < threadPoolSize; i++) {
+      String name = IDENTIFIER + " " + i;
+      LocalGroom localGroom = new LocalGroom(name);
+      localGrooms.put(name, localGroom);
+      futureList.add(threadPool.submit(new BSPRunner(conf, job, ReflectionUtils
+          .newInstance(job.getBspClass(), conf), localGroom)));
+    }
+    new Thread(new ThreadObserver(currentJobStatus)).start();
+    return currentJobStatus;
+  }
+
+  @Override
+  public ClusterStatus getClusterStatus(boolean detailed) throws IOException {
+    Map<String, String> map = new HashMap<String, String>();
+    for (Entry<String, LocalGroom> entry : localGrooms.entrySet()) {
+      map.put(entry.getKey(), entry.getValue().getPeerName());
+    }
+    return new ClusterStatus(map, threadPoolSize, threadPoolSize, State.RUNNING);
+  }
+
+  @Override
+  public JobProfile getJobProfile(BSPJobID jobid) throws IOException {
+    return new JobProfile(System.getProperty("user.name"), jobid, jobFile,
+        jobName);
+  }
+
+  @Override
+  public JobStatus getJobStatus(BSPJobID jobid) throws IOException {
+    if (currentJobStatus == null) {
+      currentJobStatus = new JobStatus(jobid, System.getProperty("user.name"),
+          0L, JobStatus.RUNNING);
+    }
+    return currentJobStatus;
+  }
+
+  @Override
+  public String getFilesystemName() throws IOException {
+    return fs.getUri().toString();
+  }
+
+  @Override
+  public JobStatus[] jobsToComplete() throws IOException {
+    return null;
+  }
+
+  @Override
+  public JobStatus[] getAllJobs() throws IOException {
+    return null;
+  }
+
+  @Override
+  public String getSystemDir() {
+    return WORKING_DIR;
+  }
+
+  @Override
+  public void killJob(BSPJobID jobid) throws IOException {
+    return;
+  }
+
+  @Override
+  public boolean killTask(TaskAttemptID taskId, boolean shouldFail)
+      throws IOException {
+    return false;
+  }
+
+  // this class will spawn a new thread and executes the BSP
+  class BSPRunner implements Callable<BSP> {
+
+    Configuration conf;
+    BSPJob job;
+    BSP bsp;
+    LocalGroom groom;
+
+    public BSPRunner(Configuration conf, BSPJob job, BSP bsp, LocalGroom groom) {
+      super();
+      this.conf = conf;
+      this.job = job;
+      this.bsp = bsp;
+      this.groom = groom;
+    }
+
+    public void run() {
+      bsp.setConf(conf);
+      try {
+         bsp.bsp(groom);
+      } catch (Exception e) {
+        LOG.error("Exception during BSP execution!", e);
+      }
+    }
+
+    @Override
+    public BSP call() throws Exception {
+      run();
+      return bsp;
+    }
+  }
+
+  // this thread observes the status of the runners.
+  class ThreadObserver implements Runnable {
+
+    JobStatus status;
+
+    public ThreadObserver(JobStatus currentJobStatus) {
+      this.status = currentJobStatus;
+    }
+
+    @Override
+    public void run() {
+      boolean success = true;
+      for (Future<BSP> future : futureList) {
+        try {
+          future.get();
+        } catch (InterruptedException e) {
+          LOG.error("Exception during BSP execution!", e);
+          success = false;
+        } catch (ExecutionException e) {
+          LOG.error("Exception during BSP execution!", e);
+          success = false;
+        }
+      }
+      if (success) {
+        currentJobStatus.setState(JobStatus.State.SUCCEEDED);
+        currentJobStatus.setRunState(JobStatus.SUCCEEDED);
+      } else {
+        currentJobStatus.setState(JobStatus.State.FAILED);
+        currentJobStatus.setRunState(JobStatus.FAILED);
+      }
+      threadPool.shutdownNow();
+    }
+
+  }
+
+  class LocalGroom extends BSPPeer {
+    private long superStepCount = 0;
+    private final ConcurrentLinkedQueue<BSPMessage> localMessageQueue = new ConcurrentLinkedQueue<BSPMessage>();
+    // outgoing queue
+    private final Map<String, ConcurrentLinkedQueue<BSPMessage>> outgoingQueues = new ConcurrentHashMap<String, ConcurrentLinkedQueue<BSPMessage>>();
+    private final String peerName;
+
+    public LocalGroom(String peerName) throws IOException {
+      this.peerName = peerName;
+    }
+
+    @Override
+    public void send(String peerName, BSPMessage msg) throws IOException {
+      if (this.peerName.equals(peerName)) {
+        put(msg);
+      } else {
+        // put this into a outgoing queue
+        if (outgoingQueues.get(peerName) == null) {
+          outgoingQueues.put(peerName, new ConcurrentLinkedQueue<BSPMessage>());
+        }
+        outgoingQueues.get(peerName).add(msg);
+      }
+    }
+
+    @Override
+    public void put(BSPMessage msg) throws IOException {
+      localMessageQueue.add(msg);
+    }
+
+    @Override
+    public BSPMessage getCurrentMessage() throws IOException {
+      return localMessageQueue.poll();
+    }
+
+    @Override
+    public int getNumCurrentMessages() {
+      return localMessageQueue.size();
+    }
+
+    @Override
+    public void sync() throws IOException, KeeperException,
+        InterruptedException {
+      // wait until all threads reach this barrier
+      barrierSync();
+      // send the messages
+      for (Entry<String, ConcurrentLinkedQueue<BSPMessage>> entry : outgoingQueues
+          .entrySet()) {
+        String peerName = entry.getKey();
+        for (BSPMessage msg : entry.getValue())
+          localGrooms.get(peerName).put(msg);
+      }
+      // clear the local outgoing queue
+      outgoingQueues.clear();
+      // sync again to avoid data inconsistency
+      barrierSync();
+      incrementSuperSteps();
+    }
+
+    private void barrierSync() throws InterruptedException {
+      try {
+        barrier.await();
+      } catch (BrokenBarrierException e) {
+        throw new InterruptedException("Barrier has been broken!" + e);
+      }
+    }
+
+    private void incrementSuperSteps() {
+      currentJobStatus.setprogress(superStepCount++);
+      currentJobStatus.setSuperstepCount(currentJobStatus.progress());
+    }
+
+    @Override
+    public long getSuperstepCount() {
+      return superStepCount;
+    }
+
+    @Override
+    public String getPeerName() {
+      return peerName;
+    }
+
+    @Override
+    public String[] getAllPeerNames() {
+      return localGrooms.keySet().toArray(
+          new String[localGrooms.keySet().size()]);
+    }
+
+    @Override
+    public void clear() {
+      localMessageQueue.clear();
+    }
+
+    @Override
+    public long getProtocolVersion(String protocol, long clientVersion)
+        throws IOException {
+      return 3;
+    }
+
+    @Override
+    public void close() throws IOException {
+
+    }
+
+    @Override
+    public void put(BSPMessageBundle messages) throws IOException {
+    }
+
+  }
+}

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/LocalBSPRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/Messagable.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/Messagable.java?rev=1151771&r1=1151770&r2=1151771&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/Messagable.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/Messagable.java Thu Jul 28 09:28:02 2011
@@ -1,25 +1,25 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hama.bsp;
-
-/**
- * A interface for BSP message class.
- */
-public interface Messagable {
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.bsp;
+
+/**
+ * A interface for BSP message class.
+ */
+public interface Messagable {
+
+}

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/Messagable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/PeerNames.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/PeerNames.java?rev=1151771&r1=1151770&r2=1151771&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/PeerNames.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/PeerNames.java Thu Jul 28 09:28:02 2011
@@ -1,63 +1,63 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.hama.bsp;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.apache.hadoop.io.Text;
-import org.apache.hadoop.io.Writable;
-
-/**
- * 
- */
-public class PeerNames implements Writable {
-  Collection<String> allPeers;
-  
-  public PeerNames() {
-    this.allPeers = new ArrayList<String>();
-  }
-  
-  public PeerNames(Collection<String> allPeers) {
-    this.allPeers = allPeers;
-  }
-  
-  public Collection<String> getAllPeerNames() {
-    return allPeers;
-  }
-  
-  @Override
-  public void write(DataOutput out) throws IOException {
-    out.writeInt(allPeers.size());
-    for (String peerName : allPeers) {
-      Text.writeString(out, peerName);
-    }
-  }
-
-  @Override
-  public void readFields(DataInput in) throws IOException {
-    int peersNum = in.readInt();
-    for (int i = 0; i < peersNum; i++) {
-      allPeers.add(Text.readString(in));
-    }
-  }
-
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hama.bsp;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.apache.hadoop.io.Text;
+import org.apache.hadoop.io.Writable;
+
+/**
+ * 
+ */
+public class PeerNames implements Writable {
+  Collection<String> allPeers;
+  
+  public PeerNames() {
+    this.allPeers = new ArrayList<String>();
+  }
+  
+  public PeerNames(Collection<String> allPeers) {
+    this.allPeers = allPeers;
+  }
+  
+  public Collection<String> getAllPeerNames() {
+    return allPeers;
+  }
+  
+  @Override
+  public void write(DataOutput out) throws IOException {
+    out.writeInt(allPeers.size());
+    for (String peerName : allPeers) {
+      Text.writeString(out, peerName);
+    }
+  }
+
+  @Override
+  public void readFields(DataInput in) throws IOException {
+    int peersNum = in.readInt();
+    for (int i = 0; i < peersNum; i++) {
+      allPeers.add(Text.readString(in));
+    }
+  }
+
+}

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/PeerNames.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/Queue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/QueueManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/ReinitGroomAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/ReportGroomStatusDirective.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/RunningJob.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/Schedulable.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/SimpleTaskScheduler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/Task.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskAttemptContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskAttemptID.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskID.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskInProgress.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskLog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskLogAppender.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskRunner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskScheduler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/TaskStatus.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/hama/trunk/src/java/org/apache/hama/bsp/package.html
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message