You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hama.apache.org by ed...@apache.org on 2012/06/04 09:44:56 UTC

svn commit: r1345851 - in /incubator/hama/trunk: ./ contrib/monitor-plugin/jvm-metrics/ core/ core/src/main/java/org/apache/ dist/ examples/ examples/src/main/java/org/apache/hama/examples/ graph/ graph/src/main/java/org/apache/hama/graph/ graph/src/te...

Author: edwardyoon
Date: Mon Jun  4 07:44:55 2012
New Revision: 1345851

URL: http://svn.apache.org/viewvc?rev=1345851&view=rev
Log:
Update website.

Added:
    incubator/hama/trunk/src/site/resources/images/headerlogo.xcf   (with props)
Removed:
    incubator/hama/trunk/DISCLAIMER.txt
Modified:
    incubator/hama/trunk/README.txt
    incubator/hama/trunk/contrib/monitor-plugin/jvm-metrics/pom.xml
    incubator/hama/trunk/core/pom.xml
    incubator/hama/trunk/core/src/main/java/org/apache/overview.html
    incubator/hama/trunk/dist/pom.xml
    incubator/hama/trunk/examples/pom.xml
    incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
    incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/MindistSearch.java
    incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PageRank.java
    incubator/hama/trunk/graph/pom.xml
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbsDiffAggregator.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbstractAggregator.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Aggregator.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MaxAggregator.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MinAggregator.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/SumAggregator.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Vertex.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInputReader.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInterface.java
    incubator/hama/trunk/graph/src/test/java/org/apache/hama/graph/example/PageRank.java
    incubator/hama/trunk/pom.xml
    incubator/hama/trunk/src/site/resources/images/headerlogo.png
    incubator/hama/trunk/src/site/site.xml
    incubator/hama/trunk/src/site/xdoc/developers.xml
    incubator/hama/trunk/src/site/xdoc/downloads.xml
    incubator/hama/trunk/src/site/xdoc/getting_started_with_hama.xml
    incubator/hama/trunk/src/site/xdoc/hama_bsp_tutorial.xml
    incubator/hama/trunk/src/site/xdoc/hama_graph_tutorial.xml
    incubator/hama/trunk/src/site/xdoc/hama_on_clouds.xml
    incubator/hama/trunk/src/site/xdoc/index.xml
    incubator/hama/trunk/src/site/xdoc/mail-lists.xml
    incubator/hama/trunk/src/site/xdoc/team-list.xml
    incubator/hama/trunk/yarn/pom.xml

Modified: incubator/hama/trunk/README.txt
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/README.txt?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/README.txt (original)
+++ incubator/hama/trunk/README.txt Mon Jun  4 07:44:55 2012
@@ -1,6 +1,6 @@
 For the latest information about Hama, please visit our website at:
 
-   http://incubator.apache.org/hama
+   http://hama.apache.org/
 
 and our wiki, at:
 

Modified: incubator/hama/trunk/contrib/monitor-plugin/jvm-metrics/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/contrib/monitor-plugin/jvm-metrics/pom.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/contrib/monitor-plugin/jvm-metrics/pom.xml (original)
+++ incubator/hama/trunk/contrib/monitor-plugin/jvm-metrics/pom.xml Mon Jun  4 07:44:55 2012
@@ -34,7 +34,7 @@
     <dependency>
       <groupId>org.apache.hama</groupId>
       <artifactId>hama-core</artifactId>
-      <version>0.5.0-incubating-SNAPSHOT</version>
+      <version>0.5.0-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

Modified: incubator/hama/trunk/core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/core/pom.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/core/pom.xml (original)
+++ incubator/hama/trunk/core/pom.xml Mon Jun  4 07:44:55 2012
@@ -21,14 +21,14 @@
   <parent>
     <groupId>org.apache.hama</groupId>
     <artifactId>hama-parent</artifactId>
-    <version>0.5.0-incubating-SNAPSHOT</version>
+    <version>0.5.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.hama</groupId>
   <artifactId>hama-core</artifactId>
   <name>core</name>
-  <version>0.5.0-incubating-SNAPSHOT</version>
+  <version>0.5.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <dependencies>

Modified: incubator/hama/trunk/core/src/main/java/org/apache/overview.html
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/core/src/main/java/org/apache/overview.html?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/core/src/main/java/org/apache/overview.html (original)
+++ incubator/hama/trunk/core/src/main/java/org/apache/overview.html Mon Jun  4 07:44:55 2012
@@ -138,7 +138,7 @@ to stop all the daemons running on your 
 <h2 id="Run_the_BSP_Examples">Run the BSP Examples</h2>
 Run the command:
 <pre style="background-color: #f3f5f7; border-bottom-color: rgb(174, 189, 204); border-bottom-style: solid; border-bottom-width: 1pt; border-left-color: rgb(174, 189, 204); border-left-style: solid; border-left-width: 1pt; border-right-color: rgb(174, 189, 204); border-right-style: solid; border-right-width: 1pt; border-top-color: rgb(174, 189, 204); border-top-style: solid; border-top-width: 1pt; font-family: courier, monospace; padding-bottom: 5pt; padding-left: 5pt; padding-right: 5pt; padding-top: 5pt; white-space: pre-wrap; word-wrap: break-word;">
-% $HAMA_HOME/bin/hama jar hama-examples-0.x.0-incubating.jar
+% $HAMA_HOME/bin/hama jar hama-examples-x.x.x.jar
 </pre>
 
 <h2 id="Hama_Web_Interfaces">Hama Web Interfaces</h2>

Modified: incubator/hama/trunk/dist/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/dist/pom.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/dist/pom.xml (original)
+++ incubator/hama/trunk/dist/pom.xml Mon Jun  4 07:44:55 2012
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.hama</groupId>
     <artifactId>hama-parent</artifactId>
-    <version>0.5.0-incubating-SNAPSHOT</version>
+    <version>0.5.0-SNAPSHOT</version>
   </parent>
   
   <artifactId>hama-dist</artifactId>

Modified: incubator/hama/trunk/examples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/pom.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/examples/pom.xml (original)
+++ incubator/hama/trunk/examples/pom.xml Mon Jun  4 07:44:55 2012
@@ -21,14 +21,14 @@
   <parent>
     <groupId>org.apache.hama</groupId>
     <artifactId>hama-parent</artifactId>
-    <version>0.5.0-incubating-SNAPSHOT</version>
+    <version>0.5.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.hama</groupId>
   <artifactId>hama-examples</artifactId>
   <name>examples</name>
-  <version>0.5.0-incubating-SNAPSHOT</version>
+  <version>0.5.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <dependencies>

Modified: incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java (original)
+++ incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/InlinkCount.java Mon Jun  4 07:44:55 2012
@@ -34,7 +34,7 @@ import org.apache.hama.graph.GraphJob;
 import org.apache.hama.graph.Vertex;
 import org.apache.hama.graph.VertexInputReader;
 
-public class InlinkCount extends Vertex<Text, IntWritable, NullWritable> {
+public class InlinkCount extends Vertex<Text, NullWritable, IntWritable> {
 
   @Override
   public void compute(Iterator<IntWritable> messages) throws IOException {
@@ -50,7 +50,7 @@ public class InlinkCount extends Vertex<
   }
 
   public static class InlinkCountTextReader extends
-      VertexInputReader<LongWritable, Text, Text, IntWritable, NullWritable> {
+      VertexInputReader<LongWritable, Text, Text, NullWritable, IntWritable> {
 
     /**
      * The text file essentially should look like: <br/>
@@ -62,7 +62,7 @@ public class InlinkCount extends Vertex<
      */
     @Override
     public boolean parseVertex(LongWritable key, Text value,
-        Vertex<Text, IntWritable, NullWritable> vertex) {
+        Vertex<Text, NullWritable, IntWritable> vertex) {
       String[] split = value.toString().split("\t");
       for (int i = 0; i < split.length; i++) {
         if (i == 0) {

Modified: incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/MindistSearch.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/MindistSearch.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/MindistSearch.java (original)
+++ incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/MindistSearch.java Mon Jun  4 07:44:55 2012
@@ -44,7 +44,7 @@ public class MindistSearch {
    * Make sure that you know that you're comparing text, and not integers!
    */
   public static class MindistSearchVertex extends
-      Vertex<Text, Text, NullWritable> {
+      Vertex<Text, NullWritable, Text> {
 
     @Override
     public void compute(Iterator<Text> messages) throws IOException {
@@ -94,7 +94,7 @@ public class MindistSearch {
   }
 
   public static class MindistSearchCountReader extends
-      VertexInputReader<LongWritable, Text, Text, Text, NullWritable> {
+      VertexInputReader<LongWritable, Text, Text, NullWritable, Text> {
 
     /**
      * The text file essentially should look like: <br/>
@@ -106,7 +106,7 @@ public class MindistSearch {
      */
     @Override
     public boolean parseVertex(LongWritable key, Text value,
-        Vertex<Text, Text, NullWritable> vertex) {
+        Vertex<Text, NullWritable, Text> vertex) {
       String[] split = value.toString().split("\t");
       for (int i = 0; i < split.length; i++) {
         if (i == 0) {

Modified: incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PageRank.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PageRank.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PageRank.java (original)
+++ incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/PageRank.java Mon Jun  4 07:44:55 2012
@@ -39,7 +39,7 @@ import org.apache.hama.graph.VertexInput
 public class PageRank {
 
   public static class PageRankVertex extends
-      Vertex<Text, DoubleWritable, NullWritable> {
+      Vertex<Text, NullWritable, DoubleWritable> {
 
     static double DAMPING_FACTOR = 0.85;
     static double MAXIMUM_CONVERGENCE_ERROR = 0.001;
@@ -90,7 +90,7 @@ public class PageRank {
   }
 
   public static class PagerankTextReader extends
-      VertexInputReader<LongWritable, Text, Text, DoubleWritable, NullWritable> {
+      VertexInputReader<LongWritable, Text, Text, NullWritable, DoubleWritable> {
 
     /**
      * The text file essentially should look like: <br/>
@@ -102,7 +102,7 @@ public class PageRank {
      */
     @Override
     public boolean parseVertex(LongWritable key, Text value,
-        Vertex<Text, DoubleWritable, NullWritable> vertex) {
+        Vertex<Text, NullWritable, DoubleWritable> vertex) {
       String[] split = value.toString().split("\t");
       for (int i = 0; i < split.length; i++) {
         if (i == 0) {

Modified: incubator/hama/trunk/graph/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/pom.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/pom.xml (original)
+++ incubator/hama/trunk/graph/pom.xml Mon Jun  4 07:44:55 2012
@@ -21,14 +21,14 @@
   <parent>
     <groupId>org.apache.hama</groupId>
     <artifactId>hama-parent</artifactId>
-    <version>0.5.0-incubating-SNAPSHOT</version>
+    <version>0.5.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.hama</groupId>
   <artifactId>hama-graph</artifactId>
   <name>graph</name>
-  <version>0.5.0-incubating-SNAPSHOT</version>
+  <version>0.5.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <dependencies>

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbsDiffAggregator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbsDiffAggregator.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbsDiffAggregator.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbsDiffAggregator.java Mon Jun  4 07:44:55 2012
@@ -25,12 +25,12 @@ import org.apache.hadoop.io.DoubleWritab
  * (sums them up) them.
  */
 public class AbsDiffAggregator extends
-    AbstractAggregator<DoubleWritable, Vertex<?, DoubleWritable, ?>> {
+    AbstractAggregator<DoubleWritable, Vertex<?, ?, DoubleWritable>> {
 
   double absoluteDifference = 0.0d;
 
   @Override
-  public void aggregate(Vertex<?, DoubleWritable, ?> v,
+  public void aggregate(Vertex<?, ?, DoubleWritable> v,
       DoubleWritable oldValue, DoubleWritable newValue) {
     // make sure it's nullsafe
     if (oldValue != null) {
@@ -41,7 +41,7 @@ public class AbsDiffAggregator extends
   // we a master aggregates he aggregated values, he calls this, so let's just
   // sum up here.
   @Override
-  public void aggregate(Vertex<?, DoubleWritable, ?> vertex,
+  public void aggregate(Vertex<?, ?, DoubleWritable> vertex,
       DoubleWritable value) {
     absoluteDifference += value.get();
   }

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbstractAggregator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbstractAggregator.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbstractAggregator.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/AbstractAggregator.java Mon Jun  4 07:44:55 2012
@@ -26,8 +26,8 @@ import org.apache.hadoop.io.Writable;
  * For tracking cases it increments an internal counter on each call of
  * aggregate.
  */
-public abstract class AbstractAggregator<V extends Writable, VERTEX extends Vertex<?, V, ?>>
-    implements Aggregator<V, VERTEX> {
+public abstract class AbstractAggregator<M extends Writable, VERTEX extends Vertex<?, ?, M>>
+    implements Aggregator<M, VERTEX> {
 
   private int timesAggregated = 0;
 
@@ -52,7 +52,7 @@ public abstract class AbstractAggregator
    * this will always be null.
    */
   @Override
-  public void aggregate(VERTEX vertex, V value) {
+  public void aggregate(VERTEX vertex, M value) {
 
   }
 
@@ -62,7 +62,7 @@ public abstract class AbstractAggregator
    * implementation in this class.Please make sure that you are null-checking
    * vertex, since on a master task this will always be null.
    */
-  public void aggregate(VERTEX vertex, V oldValue, V newValue) {
+  public void aggregate(VERTEX vertex, M oldValue, M newValue) {
 
   }
 
@@ -71,7 +71,7 @@ public abstract class AbstractAggregator
    * overridden by the user and is just an empty implementation in this class
    * (returns null).
    */
-  public V finalizeAggregation() {
+  public M finalizeAggregation() {
     return null;
   }
 
@@ -80,7 +80,7 @@ public abstract class AbstractAggregator
    * user and is just an empty implementation in this class (returns null).
    */
   @Override
-  public V getValue() {
+  public M getValue() {
     return null;
   }
 

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Aggregator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Aggregator.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Aggregator.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Aggregator.java Mon Jun  4 07:44:55 2012
@@ -27,16 +27,16 @@ import org.apache.hadoop.io.Writable;
  * The result of an aggregator from the last superstep can be picked up by the
  * vertex itself via {@link Vertex}#getLastAggregatedValue();
  */
-public interface Aggregator<V extends Writable, VERTEX extends Vertex<?, ?, ?>> {
+public interface Aggregator<M extends Writable, VERTEX extends Vertex<?, ?, ?>> {
 
   /**
    * Observes a new vertex value.
    */
-  public void aggregate(VERTEX vertex, V value);
+  public void aggregate(VERTEX vertex, M value);
 
   /**
    * Gets a vertex value.
    */
-  public V getValue();
+  public M getValue();
 
 }

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/GraphJobRunner.java Mon Jun  4 07:44:55 2012
@@ -47,11 +47,11 @@ import org.apache.hama.util.KeyValuePair
 /**
  * Fully generic graph job runner.
  * 
- * @param <VERTEX_ID> the id type of a vertex.
- * @param <VERTEX_VALUE> the value type of a vertex.
- * @param <VERTEX_VALUE> the value type of an edge.
+ * @param <V> the id type of a vertex.
+ * @param <E> the value type of an edge.
+ * @param <M> the value type of a vertex.
  */
-public final class GraphJobRunner<VERTEX_ID extends Writable, VERTEX_VALUE extends Writable, EDGE_VALUE_TYPE extends Writable>
+public final class GraphJobRunner<V extends Writable, E extends Writable, M extends Writable>
     extends BSP<Writable, Writable, Writable, Writable, GraphJobMessage> {
 
   static final Log LOG = LogFactory.getLog(GraphJobRunner.class);
@@ -68,11 +68,11 @@ public final class GraphJobRunner<VERTEX
   public static final String GRAPH_REPAIR = "hama.graph.repair";
 
   private Configuration conf;
-  private Combiner<VERTEX_VALUE> combiner;
-  private Partitioner<VERTEX_ID, VERTEX_VALUE> partitioner;
+  private Combiner<M> combiner;
+  private Partitioner<V, M> partitioner;
 
   // multiple aggregator arrays
-  private Aggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>[] aggregators;
+  private Aggregator<M, Vertex<V, E, M>>[] aggregators;
   private Writable[] globalAggregatorResult;
   private IntWritable[] globalAggregatorIncrement;
   private boolean[] isAbstractAggregator;
@@ -80,9 +80,9 @@ public final class GraphJobRunner<VERTEX
   private Text[] aggregatorValueFlag;
   private Text[] aggregatorIncrementFlag;
   // aggregator on the master side
-  private Aggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>[] masterAggregator;
+  private Aggregator<M, Vertex<V, E, M>>[] masterAggregator;
 
-  private Map<VERTEX_ID, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> vertices = new HashMap<VERTEX_ID, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>();
+  private Map<V, Vertex<V, E, M>> vertices = new HashMap<V, Vertex<V, E, M>>();
 
   private String masterTask;
   private boolean updated = true;
@@ -93,10 +93,10 @@ public final class GraphJobRunner<VERTEX
   private int maxIteration = -1;
   private long iteration;
 
-  private Class<VERTEX_ID> vertexIdClass;
-  private Class<VERTEX_VALUE> vertexValueClass;
-  private Class<EDGE_VALUE_TYPE> edgeValueClass;
-  private Class<Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> vertexClass;
+  private Class<V> vertexIdClass;
+  private Class<M> vertexValueClass;
+  private Class<E> edgeValueClass;
+  private Class<Vertex<V, E, M>> vertexClass;
 
   @Override
   @SuppressWarnings("unchecked")
@@ -107,15 +107,15 @@ public final class GraphJobRunner<VERTEX
     // Choose one as a master to collect global updates
     this.masterTask = peer.getPeerName(0);
 
-    vertexIdClass = (Class<VERTEX_ID>) conf.getClass(
-        GraphJob.VERTEX_ID_CLASS_ATTR, Text.class, Writable.class);
-    vertexValueClass = (Class<VERTEX_VALUE>) conf.getClass(
+    vertexIdClass = (Class<V>) conf.getClass(GraphJob.VERTEX_ID_CLASS_ATTR,
+        Text.class, Writable.class);
+    vertexValueClass = (Class<M>) conf.getClass(
         GraphJob.VERTEX_VALUE_CLASS_ATTR, IntWritable.class, Writable.class);
-    edgeValueClass = (Class<EDGE_VALUE_TYPE>) conf.getClass(
+    edgeValueClass = (Class<E>) conf.getClass(
         GraphJob.VERTEX_EDGE_VALUE_CLASS_ATTR, IntWritable.class,
         Writable.class);
-    vertexClass = (Class<Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>) conf
-        .getClass("hama.graph.vertex.class", Vertex.class);
+    vertexClass = (Class<Vertex<V, E, M>>) conf.getClass(
+        "hama.graph.vertex.class", Vertex.class);
 
     GraphJobMessage.VERTEX_ID_CLASS = vertexIdClass;
     GraphJobMessage.VERTEX_VALUE_CLASS = vertexValueClass;
@@ -125,18 +125,15 @@ public final class GraphJobRunner<VERTEX
     boolean repairNeeded = conf.getBoolean(GRAPH_REPAIR, false);
     boolean runtimePartitioning = conf.getBoolean(
         GraphJob.VERTEX_GRAPH_RUNTIME_PARTIONING, true);
-    partitioner = (Partitioner<VERTEX_ID, VERTEX_VALUE>) ReflectionUtils
-        .newInstance(
-            conf.getClass("bsp.input.partitioner.class", HashPartitioner.class),
-            conf);
+    partitioner = (Partitioner<V, M>) ReflectionUtils.newInstance(conf
+        .getClass("bsp.input.partitioner.class", HashPartitioner.class), conf);
 
     if (!conf.getClass(MESSAGE_COMBINER_CLASS, Combiner.class).equals(
         Combiner.class)) {
       LOG.debug("Combiner class: " + conf.get(MESSAGE_COMBINER_CLASS));
 
-      combiner = (Combiner<VERTEX_VALUE>) ReflectionUtils.newInstance(
-          conf.getClass("hama.vertex.message.combiner.class", Combiner.class),
-          conf);
+      combiner = (Combiner<M>) ReflectionUtils.newInstance(conf.getClass(
+          "hama.vertex.message.combiner.class", Combiner.class), conf);
     }
     String aggregatorClasses = conf.get(GraphJob.AGGREGATOR_CLASS_ATTR);
     if (aggregatorClasses != null) {
@@ -166,26 +163,25 @@ public final class GraphJobRunner<VERTEX
       }
     }
 
-    VertexInputReader<Writable, Writable, VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> reader = (VertexInputReader<Writable, Writable, VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>) ReflectionUtils
+    VertexInputReader<Writable, Writable, V, E, M> reader = (VertexInputReader<Writable, Writable, V, E, M>) ReflectionUtils
         .newInstance(conf.getClass(GraphJob.VERTEX_GRAPH_INPUT_READER,
             VertexInputReader.class), conf);
 
     loadVertices(peer, repairNeeded, runtimePartitioning, partitioner, reader);
     numberVertices = vertices.size() * peer.getNumPeers();
     // TODO refactor this to a single step
-    for (Entry<VERTEX_ID, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> e : vertices
-        .entrySet()) {
-      LinkedList<VERTEX_VALUE> msgIterator = new LinkedList<VERTEX_VALUE>();
-      Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> v = e.getValue();
+    for (Entry<V, Vertex<V, E, M>> e : vertices.entrySet()) {
+      LinkedList<M> msgIterator = new LinkedList<M>();
+      Vertex<V, E, M> v = e.getValue();
       msgIterator.add(v.getValue());
-      VERTEX_VALUE lastValue = v.getValue();
+      M lastValue = v.getValue();
       v.compute(msgIterator.iterator());
       if (this.aggregators != null) {
         for (int i = 0; i < this.aggregators.length; i++) {
-          Aggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> aggregator = this.aggregators[i];
+          Aggregator<M, Vertex<V, E, M>> aggregator = this.aggregators[i];
           aggregator.aggregate(v, v.getValue());
           if (isAbstractAggregator[i]) {
-            AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> intern = (AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>) aggregator;
+            AbstractAggregator<M, Vertex<V, E, M>> intern = (AbstractAggregator<M, Vertex<V, E, M>>) aggregator;
             intern.aggregate(v, lastValue, v.getValue());
             intern.aggregateInternal();
           }
@@ -209,7 +205,7 @@ public final class GraphJobRunner<VERTEX
       peer.sync();
 
       // Map <vertexID, messages>
-      final Map<VERTEX_ID, LinkedList<VERTEX_VALUE>> messages = parseMessages(peer);
+      final Map<V, LinkedList<M>> messages = parseMessages(peer);
       // use iterations here, since repair can skew the number of
       // supersteps
       if (isMasterTask(peer) && iteration > 1) {
@@ -224,7 +220,7 @@ public final class GraphJobRunner<VERTEX
             for (int i = 0; i < masterAggregator.length; i++) {
               Writable lastAggregatedValue = masterAggregator[i].getValue();
               if (isAbstractAggregator[i]) {
-                final AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> intern = ((AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>) masterAggregator[i]);
+                final AbstractAggregator<M, Vertex<V, E, M>> intern = ((AbstractAggregator<M, Vertex<V, E, M>>) masterAggregator[i]);
                 final Writable finalizeAggregation = intern
                     .finalizeAggregation();
                 if (intern.finalizeAggregation() != null) {
@@ -232,8 +228,8 @@ public final class GraphJobRunner<VERTEX
                 }
                 // this count is usually the times of active
                 // vertices in the graph
-                updatedCnt.put(aggregatorIncrementFlag[i],
-                    intern.getTimesAggregated());
+                updatedCnt.put(aggregatorIncrementFlag[i], intern
+                    .getTimesAggregated());
               }
               updatedCnt.put(aggregatorValueFlag[i], lastAggregatedValue);
             }
@@ -263,27 +259,26 @@ public final class GraphJobRunner<VERTEX
       }
 
       int messagesSize = messages.size();
-      Iterator<Entry<VERTEX_ID, LinkedList<VERTEX_VALUE>>> iterator = messages
-          .entrySet().iterator();
+      Iterator<Entry<V, LinkedList<M>>> iterator = messages.entrySet()
+          .iterator();
       while (iterator.hasNext()) {
-        Entry<VERTEX_ID, LinkedList<VERTEX_VALUE>> e = iterator.next();
-        LinkedList<VERTEX_VALUE> msgs = e.getValue();
+        Entry<V, LinkedList<M>> e = iterator.next();
+        LinkedList<M> msgs = e.getValue();
         if (combiner != null) {
-          VERTEX_VALUE combined = combiner.combine(msgs);
-          msgs = new LinkedList<VERTEX_VALUE>();
+          M combined = combiner.combine(msgs);
+          msgs = new LinkedList<M>();
           msgs.add(combined);
         }
-        Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> vertex = vertices
-            .get(e.getKey());
-        VERTEX_VALUE lastValue = vertex.getValue();
+        Vertex<V, E, M> vertex = vertices.get(e.getKey());
+        M lastValue = vertex.getValue();
         vertex.compute(msgs.iterator());
         if (aggregators != null) {
           if (this.aggregators != null) {
             for (int i = 0; i < this.aggregators.length; i++) {
-              Aggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> aggregator = this.aggregators[i];
+              Aggregator<M, Vertex<V, E, M>> aggregator = this.aggregators[i];
               aggregator.aggregate(vertex, vertex.getValue());
               if (isAbstractAggregator[i]) {
-                AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> intern = ((AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>) aggregator);
+                AbstractAggregator<M, Vertex<V, E, M>> intern = ((AbstractAggregator<M, Vertex<V, E, M>>) aggregator);
                 intern.aggregate(vertex, lastValue, vertex.getValue());
                 intern.aggregateInternal();
               }
@@ -309,11 +304,9 @@ public final class GraphJobRunner<VERTEX
       for (int i = 0; i < this.aggregators.length; i++) {
         updatedCnt.put(aggregatorValueFlag[i], aggregators[i].getValue());
         if (isAbstractAggregator[i]) {
-          updatedCnt
-              .put(
-                  aggregatorIncrementFlag[i],
-                  ((AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>) aggregators[i])
-                      .getTimesAggregated());
+          updatedCnt.put(aggregatorIncrementFlag[i],
+              ((AbstractAggregator<M, Vertex<V, E, M>>) aggregators[i])
+                  .getTimesAggregated());
         }
       }
       for (int i = 0; i < aggregators.length; i++) {
@@ -328,20 +321,20 @@ public final class GraphJobRunner<VERTEX
   }
 
   @SuppressWarnings("unchecked")
-  private Map<VERTEX_ID, LinkedList<VERTEX_VALUE>> parseMessages(
+  private Map<V, LinkedList<M>> parseMessages(
       BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
       throws IOException {
     GraphJobMessage msg = null;
-    final Map<VERTEX_ID, LinkedList<VERTEX_VALUE>> msgMap = new HashMap<VERTEX_ID, LinkedList<VERTEX_VALUE>>();
+    final Map<V, LinkedList<M>> msgMap = new HashMap<V, LinkedList<M>>();
     while ((msg = peer.getCurrentMessage()) != null) {
       // either this is a vertex message or a directive that must be read
       // as map
       if (msg.isVertexMessage()) {
-        final VERTEX_ID vertexID = (VERTEX_ID) msg.getVertexId();
-        final VERTEX_VALUE value = (VERTEX_VALUE) msg.getVertexValue();
-        LinkedList<VERTEX_VALUE> msgs = msgMap.get(vertexID);
+        final V vertexID = (V) msg.getVertexId();
+        final M value = (M) msg.getVertexValue();
+        LinkedList<M> msgs = msgMap.get(vertexID);
         if (msgs == null) {
-          msgs = new LinkedList<VERTEX_VALUE>();
+          msgs = new LinkedList<M>();
           msgMap.put(vertexID, msgs);
         }
         msgs.add(value);
@@ -357,13 +350,12 @@ public final class GraphJobRunner<VERTEX
           } else if (aggregators != null
               && vertexID.toString().startsWith(S_FLAG_AGGREGATOR_VALUE)) {
             int index = Integer.parseInt(vertexID.toString().split(";")[1]);
-            masterAggregator[index]
-                .aggregate(null, (VERTEX_VALUE) e.getValue());
+            masterAggregator[index].aggregate(null, (M) e.getValue());
           } else if (aggregators != null
               && vertexID.toString().startsWith(S_FLAG_AGGREGATOR_INCREMENT)) {
             int index = Integer.parseInt(vertexID.toString().split(";")[1]);
             if (isAbstractAggregator[index]) {
-              ((AbstractAggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>) masterAggregator[index])
+              ((AbstractAggregator<M, Vertex<V, E, M>>) masterAggregator[index])
                   .addTimesAggregated(((IntWritable) e.getValue()).get());
             }
           }
@@ -379,16 +371,14 @@ public final class GraphJobRunner<VERTEX
   @SuppressWarnings("unchecked")
   private void loadVertices(
       BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer,
-      boolean repairNeeded,
-      boolean runtimePartitioning,
-      Partitioner<VERTEX_ID, VERTEX_VALUE> partitioner,
-      VertexInputReader<Writable, Writable, VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> reader)
+      boolean repairNeeded, boolean runtimePartitioning,
+      Partitioner<V, M> partitioner,
+      VertexInputReader<Writable, Writable, V, E, M> reader)
       throws IOException, SyncException, InterruptedException {
 
     LOG.debug("vertex class: " + vertexClass);
     boolean selfReference = conf.getBoolean("hama.graph.self.ref", false);
-    Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> vertex = newVertexInstance(
-        vertexClass, conf);
+    Vertex<V, E, M> vertex = newVertexInstance(vertexClass, conf);
     vertex.setPeer(peer);
     vertex.runner = this;
     while (true) {
@@ -396,26 +386,26 @@ public final class GraphJobRunner<VERTEX
       if (next == null) {
         break;
       }
-      boolean vertexFinished = reader.parseVertex(next.getKey(),
-          next.getValue(), vertex);
+      boolean vertexFinished = reader.parseVertex(next.getKey(), next
+          .getValue(), vertex);
       if (!vertexFinished) {
         continue;
       }
       if (vertex.getEdges() == null) {
-        vertex.setEdges(new ArrayList<Edge<VERTEX_ID, EDGE_VALUE_TYPE>>(0));
+        vertex.setEdges(new ArrayList<Edge<V, E>>(0));
       }
       if (selfReference) {
-        vertex.addEdge(new Edge<VERTEX_ID, EDGE_VALUE_TYPE>(vertex
-            .getVertexID(), peer.getPeerName(), null));
+        vertex.addEdge(new Edge<V, E>(vertex.getVertexID(), peer.getPeerName(),
+            null));
       }
       if (runtimePartitioning) {
-        int partition = partitioner.getPartition(vertex.getVertexID(),
-            vertex.getValue(), peer.getNumPeers());
+        int partition = partitioner.getPartition(vertex.getVertexID(), vertex
+            .getValue(), peer.getNumPeers());
         // set the destination name for the edge now
-        for (Edge<VERTEX_ID, EDGE_VALUE_TYPE> edge : vertex.getEdges()) {
-          int edgePartition = partitioner.getPartition(
-              edge.getDestinationVertexID(), (VERTEX_VALUE) edge.getValue(),
-              peer.getNumPeers());
+        for (Edge<V, E> edge : vertex.getEdges()) {
+          int edgePartition = partitioner.getPartition(edge
+              .getDestinationVertexID(), (M) edge.getValue(), peer
+              .getNumPeers());
           edge.destinationPeerName = peer.getPeerName(edgePartition);
         }
         peer.send(peer.getPeerName(partition), new GraphJobMessage(vertex));
@@ -432,8 +422,7 @@ public final class GraphJobRunner<VERTEX
       peer.sync();
       GraphJobMessage msg = null;
       while ((msg = peer.getCurrentMessage()) != null) {
-        Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> messagedVertex = (Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>) msg
-            .getVertex();
+        Vertex<V, E, M> messagedVertex = (Vertex<V, E, M>) msg.getVertex();
         messagedVertex.setPeer(peer);
         messagedVertex.runner = this;
         messagedVertex.setup(conf);
@@ -450,22 +439,20 @@ public final class GraphJobRunner<VERTEX
      */
     if (repairNeeded) {
       LOG.debug("Starting repair of this graph!");
-      final Collection<Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> entries = vertices
-          .values();
-      for (Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> entry : entries) {
-        List<Edge<VERTEX_ID, EDGE_VALUE_TYPE>> outEdges = entry.getEdges();
-        for (Edge<VERTEX_ID, EDGE_VALUE_TYPE> e : outEdges) {
-          peer.send(e.getDestinationPeerName(),
-              new GraphJobMessage(e.getDestinationVertexID()));
+      final Collection<Vertex<V, E, M>> entries = vertices.values();
+      for (Vertex<V, E, M> entry : entries) {
+        List<Edge<V, E>> outEdges = entry.getEdges();
+        for (Edge<V, E> e : outEdges) {
+          peer.send(e.getDestinationPeerName(), new GraphJobMessage(e
+              .getDestinationVertexID()));
         }
       }
       peer.sync();
       GraphJobMessage msg = null;
       while ((msg = peer.getCurrentMessage()) != null) {
-        VERTEX_ID vertexName = (VERTEX_ID) msg.getVertexId();
+        V vertexName = (V) msg.getVertexId();
         if (!vertices.containsKey(vertexName)) {
-          Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE> newVertex = newVertexInstance(
-              vertexClass, conf);
+          Vertex<V, E, M> newVertex = newVertexInstance(vertexClass, conf);
           newVertex.setPeer(peer);
           newVertex.setVertexID(vertexName);
           newVertex.runner = this;
@@ -473,12 +460,10 @@ public final class GraphJobRunner<VERTEX
             int partition = partitioner.getPartition(newVertex.getVertexID(),
                 newVertex.getValue(), peer.getNumPeers());
             String target = peer.getPeerName(partition);
-            newVertex.setEdges(Collections
-                .singletonList(new Edge<VERTEX_ID, EDGE_VALUE_TYPE>(newVertex
-                    .getVertexID(), target, null)));
+            newVertex.setEdges(Collections.singletonList(new Edge<V, E>(
+                newVertex.getVertexID(), target, null)));
           } else {
-            newVertex.setEdges(new ArrayList<Edge<VERTEX_ID, EDGE_VALUE_TYPE>>(
-                0));
+            newVertex.setEdges(new ArrayList<Edge<V, E>>(0));
           }
           newVertex.setup(conf);
           vertices.put(vertexName, newVertex);
@@ -507,18 +492,16 @@ public final class GraphJobRunner<VERTEX
   public final void cleanup(
       BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer)
       throws IOException {
-    for (Entry<VERTEX_ID, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> e : vertices
-        .entrySet()) {
+    for (Entry<V, Vertex<V, E, M>> e : vertices.entrySet()) {
       peer.write(e.getValue().getVertexID(), e.getValue().getValue());
     }
   }
 
   @SuppressWarnings("unchecked")
-  private Aggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>> getNewAggregator(
-      String clsName) {
+  private Aggregator<M, Vertex<V, E, M>> getNewAggregator(String clsName) {
     try {
-      return (Aggregator<VERTEX_VALUE, Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE_TYPE>>) ReflectionUtils
-          .newInstance(conf.getClassByName(clsName), conf);
+      return (Aggregator<M, Vertex<V, E, M>>) ReflectionUtils.newInstance(conf
+          .getClassByName(clsName), conf);
     } catch (ClassNotFoundException e) {
       e.printStackTrace();
     }
@@ -543,7 +526,7 @@ public final class GraphJobRunner<VERTEX
     return maxIteration;
   }
 
-  public Partitioner<VERTEX_ID, VERTEX_VALUE> getPartitioner() {
+  public Partitioner<V, M> getPartitioner() {
     return partitioner;
   }
 

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MaxAggregator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MaxAggregator.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MaxAggregator.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MaxAggregator.java Mon Jun  4 07:44:55 2012
@@ -20,12 +20,12 @@ package org.apache.hama.graph;
 import org.apache.hadoop.io.IntWritable;
 
 public class MaxAggregator extends
-    AbstractAggregator<IntWritable, Vertex<?, IntWritable, ?>> {
+    AbstractAggregator<IntWritable, Vertex<?, ?, IntWritable>> {
 
   int max = Integer.MIN_VALUE;
 
   @Override
-  public void aggregate(Vertex<?, IntWritable, ?> vertex, IntWritable value) {
+  public void aggregate(Vertex<?, ?, IntWritable> vertex, IntWritable value) {
     if (value.get() > max) {
       max = value.get();
     }

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MinAggregator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MinAggregator.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MinAggregator.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/MinAggregator.java Mon Jun  4 07:44:55 2012
@@ -20,12 +20,12 @@ package org.apache.hama.graph;
 import org.apache.hadoop.io.IntWritable;
 
 public class MinAggregator extends
-    AbstractAggregator<IntWritable, Vertex<?, IntWritable, ?>> {
+    AbstractAggregator<IntWritable, Vertex<?, ?, IntWritable>> {
 
   int min = Integer.MAX_VALUE;
 
   @Override
-  public void aggregate(Vertex<?, IntWritable, ?> vertex, IntWritable value) {
+  public void aggregate(Vertex<?, ?, IntWritable> vertex, IntWritable value) {
     if (value.get() < min) {
       min = value.get();
     }

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/SumAggregator.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/SumAggregator.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/SumAggregator.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/SumAggregator.java Mon Jun  4 07:44:55 2012
@@ -23,12 +23,12 @@ import org.apache.hadoop.io.DoubleWritab
  * Sums all vertex values globally.
  */
 public class SumAggregator extends
-    AbstractAggregator<DoubleWritable, Vertex<?, DoubleWritable, ?>> {
+    AbstractAggregator<DoubleWritable, Vertex<?, ?, DoubleWritable>> {
 
   double sum = 0.0d;
 
   @Override
-  public void aggregate(Vertex<?, DoubleWritable, ?> vertex,
+  public void aggregate(Vertex<?, ?, DoubleWritable> vertex,
       DoubleWritable value) {
     sum += value.get();
   }
@@ -37,5 +37,4 @@ public class SumAggregator extends
   public DoubleWritable getValue() {
     return new DoubleWritable(sum);
   }
-
 }

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Vertex.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Vertex.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Vertex.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/Vertex.java Mon Jun  4 07:44:55 2012
@@ -27,21 +27,21 @@ import org.apache.hadoop.io.Writable;
 import org.apache.hama.bsp.BSPPeer;
 import org.apache.hama.bsp.Partitioner;
 
-public abstract class Vertex<ID_TYPE extends Writable, MSG_TYPE extends Writable, EDGE_VALUE_TYPE extends Writable>
-    implements VertexInterface<ID_TYPE, MSG_TYPE, EDGE_VALUE_TYPE> {
+public abstract class Vertex<V extends Writable, E extends Writable, M extends Writable>
+    implements VertexInterface<V, E, M> {
 
-  private ID_TYPE vertexID;
-  private MSG_TYPE value;
-  protected GraphJobRunner<ID_TYPE, MSG_TYPE, EDGE_VALUE_TYPE> runner;
+  private V vertexID;
+  private M value;
+  protected GraphJobRunner<V, E, M> runner;
   private BSPPeer<Writable, Writable, Writable, Writable, GraphJobMessage> peer;
-  private List<Edge<ID_TYPE, EDGE_VALUE_TYPE>> edges;
+  private List<Edge<V, E>> edges;
 
   public Configuration getConf() {
     return peer.getConfiguration();
   }
 
   @Override
-  public ID_TYPE getVertexID() {
+  public V getVertexID() {
     return vertexID;
   }
 
@@ -50,22 +50,22 @@ public abstract class Vertex<ID_TYPE ext
   }
 
   @Override
-  public void sendMessage(Edge<ID_TYPE, EDGE_VALUE_TYPE> e, MSG_TYPE msg)
+  public void sendMessage(Edge<V, E> e, M msg)
       throws IOException {
     peer.send(e.getDestinationPeerName(),
         new GraphJobMessage(e.getDestinationVertexID(), msg));
   }
 
   @Override
-  public void sendMessageToNeighbors(MSG_TYPE msg) throws IOException {
-    final List<Edge<ID_TYPE, EDGE_VALUE_TYPE>> outEdges = this.getEdges();
-    for (Edge<ID_TYPE, EDGE_VALUE_TYPE> e : outEdges) {
+  public void sendMessageToNeighbors(M msg) throws IOException {
+    final List<Edge<V, E>> outEdges = this.getEdges();
+    for (Edge<V, E> e : outEdges) {
       sendMessage(e, msg);
     }
   }
 
   @Override
-  public void sendMessage(ID_TYPE destinationVertexID, MSG_TYPE msg)
+  public void sendMessage(V destinationVertexID, M msg)
       throws IOException {
     int partition = getPartitioner().getPartition(destinationVertexID, msg,
         peer.getNumPeers());
@@ -78,33 +78,33 @@ public abstract class Vertex<ID_TYPE ext
     return runner.getNumberIterations();
   }
 
-  public void setEdges(List<Edge<ID_TYPE, EDGE_VALUE_TYPE>> list) {
+  public void setEdges(List<Edge<V, E>> list) {
     this.edges = list;
   }
 
-  public void addEdge(Edge<ID_TYPE, EDGE_VALUE_TYPE> edge) {
+  public void addEdge(Edge<V, E> edge) {
     if (edges == null) {
-      this.edges = new ArrayList<Edge<ID_TYPE, EDGE_VALUE_TYPE>>();
+      this.edges = new ArrayList<Edge<V, E>>();
     }
     this.edges.add(edge);
   }
 
   @Override
-  public List<Edge<ID_TYPE, EDGE_VALUE_TYPE>> getEdges() {
+  public List<Edge<V, E>> getEdges() {
     return edges;
   }
 
   @Override
-  public MSG_TYPE getValue() {
+  public M getValue() {
     return value;
   }
 
   @Override
-  public void setValue(MSG_TYPE value) {
+  public void setValue(M value) {
     this.value = value;
   }
 
-  public void setVertexID(ID_TYPE vertexID) {
+  public void setVertexID(V vertexID) {
     this.vertexID = vertexID;
   }
 
@@ -121,8 +121,8 @@ public abstract class Vertex<ID_TYPE ext
    * {@link #getLastAggregatedValue}(0).
    */
   @SuppressWarnings("unchecked")
-  public MSG_TYPE getLastAggregatedValue(int index) {
-    return (MSG_TYPE) runner.getLastAggregatedValue(index);
+  public M getLastAggregatedValue(int index) {
+    return (M) runner.getLastAggregatedValue(index);
   }
 
   /**
@@ -148,7 +148,7 @@ public abstract class Vertex<ID_TYPE ext
     return peer;
   }
 
-  public Partitioner<ID_TYPE, MSG_TYPE> getPartitioner() {
+  public Partitioner<V, M> getPartitioner() {
     return runner.getPartitioner();
   }
 

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInputReader.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInputReader.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInputReader.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInputReader.java Mon Jun  4 07:44:55 2012
@@ -22,7 +22,7 @@ import org.apache.hadoop.io.Writable;
 /**
  * A reader to read Hama's input files and parses a vertex out of it.
  */
-public abstract class VertexInputReader<KEY_IN extends Writable, VALUE_IN extends Writable, VERTEX_ID extends Writable, VERTEX_VALUE extends Writable, EDGE_VALUE extends Writable> {
+public abstract class VertexInputReader<KEY_IN extends Writable, VALUE_IN extends Writable, VERTEX_ID extends Writable, EDGE_VALUE extends Writable, VERTEX_VALUE extends Writable> {
 
   /**
    * Parses a given key and value into the given vertex. If returned true, the
@@ -30,6 +30,6 @@ public abstract class VertexInputReader<
    * next call.
    */
   public abstract boolean parseVertex(KEY_IN key, VALUE_IN value,
-      Vertex<VERTEX_ID, VERTEX_VALUE, EDGE_VALUE> vertex);
+      Vertex<VERTEX_ID, EDGE_VALUE, VERTEX_VALUE> vertex);
 
 }

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInterface.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInterface.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInterface.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexInterface.java Mon Jun  4 07:44:55 2012
@@ -27,13 +27,13 @@ import org.apache.hadoop.io.Writable;
 /**
  * The vertex interface.
  * 
- * @param <ID_TYPE> this type must be writable and should also implement equals
- *          and hashcode.
- * @param <MSG_TYPE> the type used for messaging, usually the value of a vertex.
- * @param <EDGE_VALUE_TYPE> the type used for storing edge values, usually the
- *          value of an edge.
+ * @param <V> this type must be writable and should also implement equals and
+ *          hashcode.
+ * @param <E> the type used for storing edge values, usually the value of an
+ *          edge.
+ * @param <M> the type used for messaging, usually the value of a vertex.
  */
-public interface VertexInterface<ID_TYPE extends Writable, MSG_TYPE extends Writable, EDGE_VALUE_TYPE extends Writable> {
+public interface VertexInterface<V extends Writable, E extends Writable, M extends Writable> {
 
   /**
    * Used to setup a vertex.
@@ -43,7 +43,7 @@ public interface VertexInterface<ID_TYPE
   /**
    * @return the unique identification for the vertex.
    */
-  public ID_TYPE getVertexID();
+  public V getVertexID();
 
   /**
    * @return the number of vertices in the input graph.
@@ -53,29 +53,27 @@ public interface VertexInterface<ID_TYPE
   /**
    * The user-defined function
    */
-  public void compute(Iterator<MSG_TYPE> messages) throws IOException;
+  public void compute(Iterator<M> messages) throws IOException;
 
   /**
    * @return a list of outgoing edges of this vertex in the input graph.
    */
-  public List<Edge<ID_TYPE, EDGE_VALUE_TYPE>> getEdges();
+  public List<Edge<V, E>> getEdges();
 
   /**
    * Sends a message to another vertex.
    */
-  public void sendMessage(Edge<ID_TYPE, EDGE_VALUE_TYPE> e, MSG_TYPE msg)
-      throws IOException;
+  public void sendMessage(Edge<V, E> e, M msg) throws IOException;
 
   /**
    * Sends a message to neighbors
    */
-  public void sendMessageToNeighbors(MSG_TYPE msg) throws IOException;
+  public void sendMessageToNeighbors(M msg) throws IOException;
 
   /**
    * Sends a message to the given destination vertex by ID and the message value
    */
-  public void sendMessage(ID_TYPE destinationVertexID, MSG_TYPE msg)
-      throws IOException;
+  public void sendMessage(V destinationVertexID, M msg) throws IOException;
 
   /**
    * @return the superstep number of the current superstep (starting from 0).
@@ -85,11 +83,11 @@ public interface VertexInterface<ID_TYPE
   /**
    * Sets the vertex value
    */
-  public void setValue(MSG_TYPE value);
+  public void setValue(M value);
 
   /**
    * Gets the vertex value
    */
-  public MSG_TYPE getValue();
+  public M getValue();
 
 }

Modified: incubator/hama/trunk/graph/src/test/java/org/apache/hama/graph/example/PageRank.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/test/java/org/apache/hama/graph/example/PageRank.java?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/test/java/org/apache/hama/graph/example/PageRank.java (original)
+++ incubator/hama/trunk/graph/src/test/java/org/apache/hama/graph/example/PageRank.java Mon Jun  4 07:44:55 2012
@@ -31,7 +31,7 @@ import org.apache.hama.graph.VertexInput
 
 public class PageRank {
   public static class PageRankVertex extends
-      Vertex<Text, DoubleWritable, NullWritable> {
+      Vertex<Text, NullWritable, DoubleWritable> {
 
     static double DAMPING_FACTOR = 0.85;
     static double MAXIMUM_CONVERGENCE_ERROR = 0.001;
@@ -90,7 +90,7 @@ public class PageRank {
   }
 
   public static class PagerankTextReader extends
-      VertexInputReader<LongWritable, Text, Text, DoubleWritable, NullWritable> {
+      VertexInputReader<LongWritable, Text, Text, NullWritable, DoubleWritable> {
 
     /**
      * The text file essentially should look like: <br/>
@@ -102,7 +102,7 @@ public class PageRank {
      */
     @Override
     public boolean parseVertex(LongWritable key, Text value,
-        Vertex<Text, DoubleWritable, NullWritable> vertex) {
+        Vertex<Text, NullWritable, DoubleWritable> vertex) {
       String[] split = value.toString().split("\t");
       for (int i = 0; i < split.length; i++) {
         if (i == 0) {

Modified: incubator/hama/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/pom.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/pom.xml (original)
+++ incubator/hama/trunk/pom.xml Mon Jun  4 07:44:55 2012
@@ -28,8 +28,8 @@
   <groupId>org.apache.hama</groupId>
   <artifactId>hama-parent</artifactId>
   <name>Apache Hama parent POM</name>
-  <version>0.5.0-incubating-SNAPSHOT</version>
-  <url>http://incubator.apache.org/hama</url>
+  <version>0.5.0-SNAPSHOT</version>
+  <url>http://hama.apache.org</url>
   <packaging>pom</packaging>
   <prerequisites>
     <maven>3.0</maven>
@@ -45,26 +45,26 @@
   <mailingLists>
     <mailingList>
       <name>Hama User List</name>
-      <subscribe>hama-user-subscribe@incubator.apache.org</subscribe>
-      <unsubscribe>hama-user-unsubscribe@incubator.apache.org</unsubscribe>
+      <subscribe>user-subscribe@hama.apache.org</subscribe>
+      <unsubscribe>user-unsubscribe@hama.apache.org</unsubscribe>
       <archive>
-        http://mail-archives.apache.org/mod_mbox/incubator-hama-user/
+        http://mail-archives.apache.org/mod_mbox/hama-user-hama-user/
       </archive>
     </mailingList>
     <mailingList>
       <name>Hama Developer List</name>
-      <subscribe>hama-dev-subscribe@incubator.apache.org</subscribe>
-      <unsubscribe>hama-dev-unsubscribe@incubator.apache.org</unsubscribe>
+      <subscribe>dev-subscribe@hama.apache.org</subscribe>
+      <unsubscribe>dev-unsubscribe@hama.apache.org</unsubscribe>
       <archive>
-        http://mail-archives.apache.org/mod_mbox/incubator-hama-dev/
+        http://mail-archives.apache.org/mod_mbox/hama-dev/
       </archive>
     </mailingList>
     <mailingList>
       <name>Hama Commits List</name>
-      <subscribe>hama-commits-subscribe@incubator.apache.org</subscribe>
-      <unsubscribe>hama-commits-unsubscribe@incubator.apache.org</unsubscribe>
+      <subscribe>commits-subscribe@hama.apache.org</subscribe>
+      <unsubscribe>commits-unsubscribe@hama.apache.org</unsubscribe>
       <archive>
-        http://mail-archives.apache.org/mod_mbox/incubator-hama-commits/
+        http://mail-archives.apache.org/mod_mbox/hama-commits/
       </archive>
     </mailingList>
   </mailingLists>
@@ -76,12 +76,12 @@
     </license>
   </licenses>
   <scm>
-    <url>scm:svn:https://svn.apache.org/repos/asf/incubator/hama/</url>
+    <url>scm:svn:https://svn.apache.org/repos/asf/hama/</url>
     <connection>
-      scm:svn:http://svn.apache.org/repos/asf/incubator/hama/trunk/
+      scm:svn:http://svn.apache.org/repos/asf/hama/trunk/
     </connection>
     <developerConnection>
-      scm:svn:https://svn.apache.org/repos/asf/incubator/hama/trunk/
+      scm:svn:https://svn.apache.org/repos/asf/hama/trunk/
     </developerConnection>
   </scm>
 
@@ -381,7 +381,7 @@
   <distributionManagement>
     <site>
       <id>apache.website</id>
-      <url>scpexe://people.apache.org/www/incubator.apache.org/content/hama</url>
+      <url>scpexe://people.apache.org/www/hama.apache.org</url>
     </site>
   </distributionManagement>
 </project>

Modified: incubator/hama/trunk/src/site/resources/images/headerlogo.png
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/resources/images/headerlogo.png?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
Binary files - no diff available.

Added: incubator/hama/trunk/src/site/resources/images/headerlogo.xcf
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/resources/images/headerlogo.xcf?rev=1345851&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/hama/trunk/src/site/resources/images/headerlogo.xcf
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/hama/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/site.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/site.xml (original)
+++ incubator/hama/trunk/src/site/site.xml Mon Jun  4 07:44:55 2012
@@ -18,13 +18,9 @@
 <project name="Hama">
   <bannerLeft>
     <name>Hama</name>
-    <src>http://incubator.apache.org/hama/images/apache-incubator-hama-white.png</src>
-    <href>http://incubator.apache.org/hama/index.html</href>
+    <src>/images/headerlogo.png</src>
+    <href>/index.html</href>
   </bannerLeft>
-  <bannerRight>
-    <src>http://incubator.apache.org/hama/images/apache-incubator-logo.png</src>
-    <href>http://incubator.apache.org/</href>
-  </bannerRight>
 
   <publishDate position="right"/>
   <version position="right"/>
@@ -40,14 +36,13 @@
       <item name="Wiki" href="https://wiki.apache.org/hama" />
       <item name="Blog" href="http://blogs.apache.org/hama/" />
       <item name="JIRA" href="https://issues.apache.org/jira/browse/HAMA" />
-      <item name="SVN" href="https://svn.apache.org/repos/asf/incubator/hama/" />
+      <item name="SVN" href="https://svn.apache.org/repos/asf/hama/" />
       <item name="Twitter" href="http://twitter.com/apachehama" />
     </links>
 
     <breadcrumbs position="left">
       <item name="Apache" href="http://www.apache.org/" />
-      <item name="Apache Incubator" href="http://incubator.apache.org/" />
-      <item name="Hama" href="http://incubator.apache.org/hama/"/>
+      <item name="Hama" href="http://hama.apache.org/"/>
     </breadcrumbs>
 
     <menu name="Information">
@@ -77,7 +72,7 @@
 
     <menu name="Related Projects">
       <item name="Hadoop" href="http://hadoop.apache.org/" />
-      <item name="Whirr" href="https://incubator.apache.org/whirr/" />
+      <item name="Whirr" href="https://whirr.apache.org/" />
       <item name="Bigtop" href="https://incubator.apache.org/bigtop/" />
       <item name="Mahout" href="http://mahout.apache.org/" />
     </menu>

Modified: incubator/hama/trunk/src/site/xdoc/developers.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/developers.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/developers.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/developers.xml Mon Jun  4 07:44:55 2012
@@ -32,7 +32,7 @@ xsi:schemaLocation="http://maven.apache.
     <subsection name="Source Code"></subsection>
     <p>
     The source files are now stored on Subversion : 
-    <a href="https://svn.apache.org/repos/asf/incubator/hama/trunk">https://svn.apache.org/repos/asf/incubator/hama/trunk</a>
+    <a href="https://svn.apache.org/repos/asf/hama/trunk">https://svn.apache.org/repos/asf/hama/trunk</a>
     <br/>
     And, git mirros : <a href="git://git.apache.org/hama.git">git://git.apache.org/hama.git</a>
     [ <a href="http://git.apache.org/hama.git">http</a>, <a href="http://github.com/apache/hama">github</a> ] 

Modified: incubator/hama/trunk/src/site/xdoc/downloads.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/downloads.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/downloads.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/downloads.xml Mon Jun  4 07:44:55 2012
@@ -30,7 +30,7 @@ xsi:schemaLocation="http://maven.apache.
     <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
     See the NOTICE.txt file contained in each release artifact for applicable copyright attribution notices.
     <br/><br/>
-    <a href="http://www.apache.org/dyn/closer.cgi/incubator/hama">Download a release now!</a>
+    <a href="http://www.apache.org/dyn/closer.cgi/hama">Download a release now!</a>
     </p>
     
     <subsection name="PGP Signatures"></subsection>

Modified: incubator/hama/trunk/src/site/xdoc/getting_started_with_hama.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/getting_started_with_hama.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/getting_started_with_hama.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/getting_started_with_hama.xml Mon Jun  4 07:44:55 2012
@@ -121,6 +121,6 @@ xsi:schemaLocation="http://maven.apache.
     <p>to stop all the daemons running on your cluster.</p>
     <subsection name="Execute Hama Examples"></subsection>
   <pre class="green">
-  % $HAMA_HOME/bin/hama jar hama-examples-0.x.0-incubating.jar [args]</pre>
+  % $HAMA_HOME/bin/hama jar hama-examples-x.x.x.jar [args]</pre>
     </body>
 </document>

Modified: incubator/hama/trunk/src/site/xdoc/hama_bsp_tutorial.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/hama_bsp_tutorial.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/hama_bsp_tutorial.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/hama_bsp_tutorial.xml Mon Jun  4 07:44:55 2012
@@ -41,7 +41,7 @@ xsi:schemaLocation="http://maven.apache.
     The extending class must override the bsp() method, which is declared like this:
     </p>
     <pre class="green">
-  public abstract void bsp(BSPPeer&lt;K1, V1, K2, V2&gt; peer) throws IOException, 
+  public abstract void bsp(BSPPeer&lt;K1, V1, K2, V2, M extends Writable&gt; peer) throws IOException, 
     SyncException, InterruptedException;</pre>
     
     <p>
@@ -90,7 +90,7 @@ xsi:schemaLocation="http://maven.apache.
     <pre class="green">
  @Override
   public final void bsp(
-      BSPPeer&lt;LongWritable, Text, Text, LongWritable&gt; peer)
+      BSPPeer&lt;LongWritable, Text, Text, LongWritable, Text&gt; peer)
       throws IOException, InterruptedException, SyncException {
       
       // this method reads the next key value record from file
@@ -140,11 +140,11 @@ xsi:schemaLocation="http://maven.apache.
     <pre class="green">
   @Override
   public void bsp(
-      BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable&gt; peer)
+      BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable, Text&gt; peer)
       throws IOException, SyncException, InterruptedException {
     for (String peerName : peer.getAllPeerNames()) {
       peer.send(peerName, 
-        new LongMessage("Hello from " + peer.getPeerName(), System.currentTimeMillis()));
+        new Text("Hello from " + peer.getPeerName(), System.currentTimeMillis()));
     }
 
     peer.sync();
@@ -165,7 +165,7 @@ xsi:schemaLocation="http://maven.apache.
     <pre class="green">
   @Override
   public void bsp(
-      BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable&gt; peer)
+      BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable, Text&gt; peer)
       throws IOException, SyncException, InterruptedException {
     for (int i = 0; i &lt; 100; i++) {
       // send some messages
@@ -192,59 +192,55 @@ xsi:schemaLocation="http://maven.apache.
     <subsection name="Example: Pi Calculation"></subsection>
     <p>Here is an BSP-based Pi Calculation example and submit it to Hama cluster:</p>
     <pre class="green">
-public class PiEstimator {
   private static Path TMP_OUTPUT = new Path("/tmp/pi-" + System.currentTimeMillis());
 
   public static class MyEstimator extends
-      BSP&lt;NullWritable, NullWritable, Text, DoubleWritable&gt; {
+      BSP&lt;NullWritable, NullWritable, Text, DoubleWritable, DoubleWritable&gt; {
     public static final Log LOG = LogFactory.getLog(MyEstimator.class);
     private String masterTask;
     private static final int iterations = 10000;
 
     @Override
     public void bsp(
-        BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable&gt; peer)
+        BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable, DoubleWritable&gt; peer)
         throws IOException, SyncException, InterruptedException {
 
-      int in = 0, out = 0;
+      int in = 0;
       for (int i = 0; i &lt; iterations; i++) {
         double x = 2.0 * Math.random() - 1.0, y = 2.0 * Math.random() - 1.0;
         if ((Math.sqrt(x * x + y * y) &lt; 1.0)) {
           in++;
-        } else {
-          out++;
         }
       }
 
-      double data = 4.0 * (double) in / (double) iterations;
-      DoubleMessage estimate = new DoubleMessage(peer.getPeerName(), data);
+      double data = 4.0 * in / iterations;
 
-      peer.send(masterTask, estimate);
+      peer.send(masterTask, new DoubleWritable(data));
       peer.sync();
     }
 
     @Override
     public void setup(
-        BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable&gt; peer)
+        BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable, DoubleWritable&gt; peer)
         throws IOException {
       // Choose one as a master
       this.masterTask = peer.getPeerName(peer.getNumPeers() / 2);
     }
 
+    @Override
     public void cleanup(
-        BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable&gt; peer)
+        BSPPeer&lt;NullWritable, NullWritable, Text, DoubleWritable, DoubleWritable&gt; peer)
         throws IOException {
       if (peer.getPeerName().equals(masterTask)) {
         double pi = 0.0;
         int numPeers = peer.getNumCurrentMessages();
-        DoubleMessage received;
-        while ((received = (DoubleMessage) peer.getCurrentMessage()) != null) {
-          pi += received.getData();
+        DoubleWritable received;
+        while ((received = peer.getCurrentMessage()) != null) {
+          pi += received.get();
         }
 
         pi = pi / numPeers;
-        peer
-            .write(new Text("Estimated value of PI is"), new DoubleWritable(pi));
+        peer.write(new Text("Estimated value of PI is"), new DoubleWritable(pi));
       }
     }
   }
@@ -293,10 +289,8 @@ public class PiEstimator {
     if (bsp.waitForCompletion(true)) {
       printOutput(conf);
       System.out.println("Job Finished in "
-          + (double) (System.currentTimeMillis() - startTime) / 1000.0
-          + " seconds");
+          + (System.currentTimeMillis() - startTime) / 1000.0 + " seconds");
     }
-  }
-}</pre>
+  }</pre>
   </body>
 </document>

Modified: incubator/hama/trunk/src/site/xdoc/hama_graph_tutorial.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/hama_graph_tutorial.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/hama_graph_tutorial.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/hama_graph_tutorial.xml Mon Jun  4 07:44:55 2012
@@ -29,9 +29,10 @@ xsi:schemaLocation="http://maven.apache.
 
     <subsection name="Vertex API"></subsection>    
 
-    <p>Writing a Hama graph application involves subclassing the predefined Vertex class. Its template arguments define message value type.</p>
+    <p>Writing a Hama graph application involves subclassing the predefined Vertex class. Its template arguments define three value types, associated with vertices, edges, and messages.</p>
     <pre class="green">
-  public abstract class Vertex&lt;M extends Writable&gt; implements VertexInterface&lt;M&gt; {
+  public abstract class Vertex&lt;ID_TYPE extends Writable, MSG_TYPE extends Writable, EDGE_VALUE_TYPE extends Writable&gt;
+      implements VertexInterface&lt;ID_TYPE, MSG_TYPE, EDGE_VALUE_TYPE&gt; {
 
     public void compute(Iterator&lt;MSGTYPE&gt; messages) throws IOException;
     ..
@@ -48,60 +49,39 @@ From Superstep 1 to 30, each vertex sums
    </p>
 
     <pre class="green">
-  public static class PageRankVertex extends Vertex&lt;DoubleWritable&gt; {
+  public static class PageRankVertex extends
+      Vertex&lt;Text, NullWritable, DoubleWritable&gt; {
+
+    static double DAMPING_FACTOR = 0.85;
+    static double MAXIMUM_CONVERGENCE_ERROR = 0.001;
 
     @Override
     public void compute(Iterator&lt;DoubleWritable&gt; messages) throws IOException {
+      // initialize this vertex to 1 / count of global vertices in this graph
       if (this.getSuperstepCount() == 0) {
-        this.setValue(new DoubleWritable(1.0 / (double) this.getNumVertices()));
+        this.setValue(new DoubleWritable(1.0 / this.getNumVertices()));
       }
 
+      // in the first superstep, there are no messages to check
       if (this.getSuperstepCount() &gt;= 1) {
         double sum = 0;
         while (messages.hasNext()) {
           DoubleWritable msg = messages.next();
           sum += msg.get();
         }
-
-        double ALPHA = (1 - 0.85) / (double) this.getNumVertices();
-        this.setValue(new DoubleWritable(ALPHA + (0.85 * sum)));
-      }
-
-      if (this.getSuperstepCount() &lt; this.getMaxIteration()) {
-        int numEdges = this.getOutEdges().size();
-        sendMessageToNeighbors(new DoubleWritable(this.getValue().get()
-            / numEdges));
-      }
-    }
-
-    public static void main(String[] args) throws IOException,
-        InterruptedException, ClassNotFoundException {
-      HamaConfiguration conf = new HamaConfiguration(new Configuration());
-      GraphJob pageJob = new GraphJob(conf, PageRank.class);
-      pageJob.setJobName("Pagerank");
-
-      pageJob.setVertexClass(PageRankVertex.class);
-      pageJob.setMaxIteration(30);
-
-      pageJob.setInputPath(new Path(args[0]));
-      pageJob.setOutputPath(new Path(args[1]));
-
-      if (args.length == 3) {
-        pageJob.setNumBspTask(Integer.parseInt(args[2]));
+        double alpha = (1.0d - DAMPING_FACTOR) / this.getNumVertices();
+        this.setValue(new DoubleWritable(alpha + (DAMPING_FACTOR * sum)));
       }
 
-      pageJob.setInputFormat(SequenceFileInputFormat.class);
-      pageJob.setPartitioner(HashPartitioner.class);
-      pageJob.setOutputFormat(SequenceFileOutputFormat.class);
-      pageJob.setOutputKeyClass(Text.class);
-      pageJob.setOutputValueClass(DoubleWritable.class);
-
-      long startTime = System.currentTimeMillis();
-      if (pageJob.waitForCompletion(true)) {
-        System.out.println("Job Finished in "
-            + (double) (System.currentTimeMillis() - startTime) / 1000.0
-            + " seconds");
+      // if we have not reached our global error yet, then proceed.
+      DoubleWritable globalError = getLastAggregatedValue(0);
+      if (globalError != null &amp;&amp; this.getSuperstepCount() &gt; 2
+          &amp;&amp; MAXIMUM_CONVERGENCE_ERROR &gt; globalError.get()) {
+        return;
       }
+      
+      // in each superstep we are going to send a new rank to our neighbours
+      sendMessageToNeighbors(new DoubleWritable(this.getValue().get() / numEdges));
     }
   }</pre>
 

Modified: incubator/hama/trunk/src/site/xdoc/hama_on_clouds.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/hama_on_clouds.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/hama_on_clouds.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/hama_on_clouds.xml Mon Jun  4 07:44:55 2012
@@ -39,7 +39,7 @@ xsi:schemaLocation="http://maven.apache.
     </p>
     <subsection name="Execute Hama Examples"></subsection>
     <pre class="green">
-  % cd /usr/local/hama-0.x.0-incubating
-  % bin/hama jar hama-examples-0.x.0-incubating.jar [args]</pre>
+  % cd /usr/local/hama-0.x.0
+  % bin/hama jar hama-examples-x.x.x.jar [args]</pre>
     </body>
 </document>

Modified: incubator/hama/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/index.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/index.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/index.xml Mon Jun  4 07:44:55 2012
@@ -23,26 +23,15 @@ xsi:schemaLocation="http://maven.apache.
   <body>
 
     <section name="Apache Hama"></section>
-      <img src="images/hama_art_arthur_300x220.png" align="right" style="margin-top:-20px;margin-left:20px;margin-right:20px;" />
       <p>
       <strong>Apache Hama</strong> is a pure BSP(Bulk Synchronous Parallel) computing framework on top of HDFS (Hadoop Distributed File System) for massive scientific computations 
-      such as matrix, graph and network algorithms. Currently, it has the following features:
-      </p>
-      <ul>
-        <li>Job submission and management interface.</li>
-        <li>Multiple tasks per node.</li>
-        <li>Input/Output Formatter.</li>
-        <li>Checkpoint recovery.</li>
-        <li>Support to run in the Cloud using <a href="hama_on_clouds.html">Apache Whirr</a>.</li>
-        <li>Support to run with Hadoop YARN.</li>
-        <li>Support Pregel-style Graph computing framework as a sub-module.</li>
-      </ul>
-      <br/>
+      such as matrix, graph and network algorithms.</p>
       <table class="green" width="100%" cellspacing="0" cellpadding="5" border="1"> 
       <tr><td> 
           <h3 align="center">Recent News</h3>
           <ul>
-            <li>April 10, 2012: release 0.5.0 available</li>
+            <li>June 31, 2012: release 0.5.0 available [<a href="downloads.html">downloads</a>]</li>
+            <li>May 17, 2012: Apache Hama graduated as a Top Level Project!</li>
             <li>Feb 5, 2012: release 0.4.0 available</li>
             <li>July 28, 2011: release 0.3.0 available</li>
             <li>June 2, 2011: release 0.2.0 available</li>
@@ -80,14 +69,5 @@ xsi:schemaLocation="http://maven.apache.
         <li>See our <a href="http://wiki.apache.org/hama/HowToContribute">How to Contribute to Hama</a> page</li>
         <li><a href="http://wiki.apache.org/hama/Jira">Jira usage guidelines</a></li>
       </ul>
-      
-    <subsection name="Disclaimer"></subsection>
-      <p>
-       Apache Hama is an effort undergoing incubation at The Apache Software Foundation (ASF), 
-      sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, 
-      communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. 
-      While incubation status is not necessarily a reflection of the completeness or stability of the code, 
-      it does indicate that the project has yet to be fully endorsed by the ASF.
-      </p>
   </body>
 </document>

Modified: incubator/hama/trunk/src/site/xdoc/mail-lists.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/mail-lists.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/mail-lists.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/mail-lists.xml Mon Jun  4 07:44:55 2012
@@ -28,22 +28,22 @@ xsi:schemaLocation="http://maven.apache.
     <p>
     If you use Hama, please subscribe to the Hama user mailing list.<br /> 
     The Hama user mailing list is : 
-    <a href="mailto:hama-user@incubator.apache.org">hama-user@incubator.apache.org</a>.
+    <a href="mailto:user@hama.apache.org">user@hama.apache.org</a>.
     </p>
     <ul>
-    <li><a href="mailto:hama-user-subscribe@incubator.apache.org">Subscribe to List</a></li>
-    <li><a href="mailto:hama-user-unsubscribe@incubator.apache.org">Unsubscribe from List</a></li>
+    <li><a href="mailto:user-subscribe@hama.apache.org">Subscribe to List</a></li>
+    <li><a href="mailto:user-unsubscribe@hama.apache.org">Unsubscribe from List</a></li>
     </ul>
     
     <subsection name="Hama Developer List"></subsection>
     <p>
     If you'd like to contribute to Hama, please subscribe to the Hama developer mailing list.<br /> 
     The Hama developer mailing list is : 
-    <a href="mailto:hama-dev@incubator.apache.org">hama-dev@incubator.apache.org</a>.
+    <a href="mailto:dev@hama.apache.org">dev@hama.apache.org</a>.
     </p>
     <ul>
-    <li><a href="mailto:hama-dev-subscribe@incubator.apache.org">Subscribe to List</a></li>
-    <li><a href="mailto:hama-dev-unsubscribe@incubator.apache.org">Unsubscribe from List</a></li>
+    <li><a href="mailto:dev-subscribe@hama.apache.org">Subscribe to List</a></li>
+    <li><a href="mailto:dev-unsubscribe@hama.apache.org">Unsubscribe from List</a></li>
     </ul>
     
     <subsection name="Hama Commit List"></subsection>
@@ -51,11 +51,11 @@ xsi:schemaLocation="http://maven.apache.
     If you'd like to see changes made in Hama's version control system  then subscribe 
     to the Hama commit mailing list.<br />
     The Hama commit mailing list is : 
-    <a href="mailto:hama-commits@incubator.apache.org">hama-commits@incubator.apache.org</a>.
+    <a href="mailto:commits@hama.apache.org">commits@hama.apache.org</a>.
     </p>
     <ul>
-    <li><a href="mailto:hama-commits-subscribe@incubator.apache.org">Subscribe to List</a></li>
-    <li><a href="mailto:hama-commits-unsubscribe@incubator.apache.org">Unsubscribe from List</a></li>
+    <li><a href="mailto:commits-subscribe@hama.apache.org">Subscribe to List</a></li>
+    <li><a href="mailto:commits-unsubscribe@hama.apache.org">Unsubscribe from List</a></li>
     </ul>
     
   </body>

Modified: incubator/hama/trunk/src/site/xdoc/team-list.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/site/xdoc/team-list.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/src/site/xdoc/team-list.xml (original)
+++ incubator/hama/trunk/src/site/xdoc/team-list.xml Mon Jun  4 07:44:55 2012
@@ -53,58 +53,40 @@ xsi:schemaLocation="http://maven.apache.
         </th>
        </tr>
        <tr valign="top">
-          <td align="center">chanwit</td>
-          <td align="center">Chanwit Kaewkasi</td>
-          <td align="center">The University of Manchester</td>
-          <td align="center">committer</td>
-        </tr>
-       <tr valign="top">
-          <td align="center">ianh</td>
-          <td align="center">Ian Holsman</td>
-          <td align="center">AOL</td>
-          <td align="center">mentor, committer</td>
-        </tr>
-       <tr valign="top">
           <td align="center">tommaso</td>
           <td align="center">Tommaso Teofili</td>
           <td align="center">Adobe</td>
-          <td align="center">mentor, committer</td>
+          <td align="center">PMC member, committer</td>
         </tr>
        <tr valign="top">
           <td align="center">edwardyoon</td>
           <td align="center"><a href="http://blog.udanax.org/">Edward J. Yoon</a></td>
-          <td align="center">Oracle corporation</td>
-          <td align="center">committer</td>
-        </tr>
-       <tr valign="top">
-          <td align="center">jeastman</td>
-          <td align="center">Jeff Eastman</td>
-          <td align="center">Narus</td>
-          <td align="center">mentor, committer</td>
+          <td align="center">Oracle</td>
+          <td align="center">PMC member, committer</td>
         </tr>
        <tr valign="top">
           <td align="center">stevel</td>
           <td align="center">Steve Loughran</td>
-          <td align="center">HP Laboratories</td>
-          <td align="center">mentor, committer</td>
+          <td align="center">Hortonworks</td>
+          <td align="center">PMC member, committer</td>
         </tr>
        <tr valign="top">
           <td align="center">tjungblut</td>
           <td align="center">Thomas Jungblut</td>
           <td align="center">Testberichte.de</td>
-          <td align="center">committer</td>
+          <td align="center">PMC member, committer</td>
         </tr>
        <tr valign="top">
           <td align="center">chl501</td>
           <td align="center">Chia-Hung Lin</td>
           <td align="center">.</td>
-          <td align="center">committer</td>
+          <td align="center">PMC member, committer</td>
         </tr>
        <tr valign="top">
           <td align="center">surajsmenon</td>
           <td align="center">Suraj Menon</td>
           <td align="center">Verisign</td>
-          <td align="center">committer</td>
+          <td align="center">PMC member, committer</td>
         </tr>
 
     </table>

Modified: incubator/hama/trunk/yarn/pom.xml
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/yarn/pom.xml?rev=1345851&r1=1345850&r2=1345851&view=diff
==============================================================================
--- incubator/hama/trunk/yarn/pom.xml (original)
+++ incubator/hama/trunk/yarn/pom.xml Mon Jun  4 07:44:55 2012
@@ -20,14 +20,14 @@
   <parent>
     <groupId>org.apache.hama</groupId>
     <artifactId>hama-parent</artifactId>
-    <version>0.5.0-incubating-SNAPSHOT</version>
+    <version>0.5.0-SNAPSHOT</version>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.hama</groupId>
   <artifactId>hama-yarn</artifactId>
   <name>yarn</name>
-  <version>0.5.0-incubating-SNAPSHOT</version>
+  <version>0.5.0-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <dependencies>