hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1235582 - in /incubator/hama/trunk: examples/src/main/java/org/apache/hama/examples/ShortestPathVertex.java graph/src/main/java/org/apache/hama/graph/VertexWritable.java
Date Wed, 25 Jan 2012 00:57:20 GMT
Author: edwardyoon
Date: Wed Jan 25 00:57:19 2012
New Revision: 1235582

URL: http://svn.apache.org/viewvc?rev=1235582&view=rev
Log: (empty)

Modified:
    incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/ShortestPathVertex.java
    incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java

Modified: incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/ShortestPathVertex.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/ShortestPathVertex.java?rev=1235582&r1=1235581&r2=1235582&view=diff
==============================================================================
--- incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/ShortestPathVertex.java
(original)
+++ incubator/hama/trunk/examples/src/main/java/org/apache/hama/examples/ShortestPathVertex.java
Wed Jan 25 00:57:19 2012
@@ -21,11 +21,9 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.hadoop.io.WritableComparable;
 import org.apache.hama.graph.VertexWritable;
 
-public final class ShortestPathVertex extends VertexWritable implements
-    WritableComparable<ShortestPathVertex> {
+public final class ShortestPathVertex extends VertexWritable {
 
   private int weight;
   private int cost = Integer.MAX_VALUE;
@@ -76,10 +74,9 @@ public final class ShortestPathVertex ex
     super.write(out);
     out.writeInt(weight);
   }
-
+  
   public int compareTo(ShortestPathVertex o) {
     ShortestPathVertex that = (ShortestPathVertex) o;
     return this.name.compareTo(that.name);
   }
-
 }

Modified: incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java?rev=1235582&r1=1235581&r2=1235582&view=diff
==============================================================================
--- incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java (original)
+++ incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java Wed
Jan 25 00:57:19 2012
@@ -22,8 +22,9 @@ import java.io.DataOutput;
 import java.io.IOException;
 
 import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.io.WritableComparable;
 
-public class VertexWritable implements Writable {
+public class VertexWritable implements Writable, WritableComparable<VertexWritable>
{
 
   protected String name;
 
@@ -80,4 +81,10 @@ public class VertexWritable implements W
     return getName();
   }
 
+  @Override
+  public int compareTo(VertexWritable o) {
+    VertexWritable that = (VertexWritable) o;
+    return this.name.compareTo(that.name);
+  }
+
 }



Mime
View raw message