giraph-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject git commit: updated refs/heads/trunk to 414ef89
Date Wed, 01 Oct 2014 17:21:30 GMT
Repository: giraph
Updated Branches:
  refs/heads/trunk 185205703 -> 414ef89eb


removing unnecessary specialization in MessageCombiners (ikabiljo via majakabiljo)


Project: http://git-wip-us.apache.org/repos/asf/giraph/repo
Commit: http://git-wip-us.apache.org/repos/asf/giraph/commit/414ef89e
Tree: http://git-wip-us.apache.org/repos/asf/giraph/tree/414ef89e
Diff: http://git-wip-us.apache.org/repos/asf/giraph/diff/414ef89e

Branch: refs/heads/trunk
Commit: 414ef89ebd00594ab93e410d09ce007eaad3b202
Parents: 1852057
Author: Maja Kabiljo <majakabiljo@fb.com>
Authored: Wed Oct 1 10:21:00 2014 -0700
Committer: Maja Kabiljo <majakabiljo@fb.com>
Committed: Wed Oct 1 10:21:00 2014 -0700

----------------------------------------------------------------------
 .../org/apache/giraph/combiner/DoubleSumMessageCombiner.java   | 6 +++---
 .../org/apache/giraph/combiner/FloatSumMessageCombiner.java    | 6 +++---
 .../apache/giraph/combiner/MinimumDoubleMessageCombiner.java   | 6 +++---
 .../org/apache/giraph/combiner/MinimumIntMessageCombiner.java  | 5 +++--
 .../org/apache/giraph/combiner/SimpleSumMessageCombiner.java   | 6 +++---
 5 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/414ef89e/giraph-core/src/main/java/org/apache/giraph/combiner/DoubleSumMessageCombiner.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/combiner/DoubleSumMessageCombiner.java
b/giraph-core/src/main/java/org/apache/giraph/combiner/DoubleSumMessageCombiner.java
index 163e0d8..c7c97a4 100644
--- a/giraph-core/src/main/java/org/apache/giraph/combiner/DoubleSumMessageCombiner.java
+++ b/giraph-core/src/main/java/org/apache/giraph/combiner/DoubleSumMessageCombiner.java
@@ -19,16 +19,16 @@
 package org.apache.giraph.combiner;
 
 import org.apache.hadoop.io.DoubleWritable;
-import org.apache.hadoop.io.LongWritable;
+import org.apache.hadoop.io.WritableComparable;
 
 /**
  * A combiner that sums double-valued messages
  */
 public class DoubleSumMessageCombiner
     extends
-    MessageCombiner<LongWritable, DoubleWritable> {
+    MessageCombiner<WritableComparable, DoubleWritable> {
   @Override
-  public void combine(LongWritable vertexIndex, DoubleWritable originalMessage,
+  public void combine(WritableComparable vertexIndex, DoubleWritable originalMessage,
       DoubleWritable messageToCombine) {
     originalMessage.set(originalMessage.get() + messageToCombine.get());
   }

http://git-wip-us.apache.org/repos/asf/giraph/blob/414ef89e/giraph-core/src/main/java/org/apache/giraph/combiner/FloatSumMessageCombiner.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/combiner/FloatSumMessageCombiner.java
b/giraph-core/src/main/java/org/apache/giraph/combiner/FloatSumMessageCombiner.java
index b13a7f7..0bbea4e 100644
--- a/giraph-core/src/main/java/org/apache/giraph/combiner/FloatSumMessageCombiner.java
+++ b/giraph-core/src/main/java/org/apache/giraph/combiner/FloatSumMessageCombiner.java
@@ -19,16 +19,16 @@
 package org.apache.giraph.combiner;
 
 import org.apache.hadoop.io.FloatWritable;
-import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.io.WritableComparable;
 
 /**
  * A combiner that sums float-valued messages
  */
 public class FloatSumMessageCombiner
     extends
-    MessageCombiner<IntWritable, FloatWritable> {
+    MessageCombiner<WritableComparable, FloatWritable> {
   @Override
-  public void combine(IntWritable vertexIndex, FloatWritable originalMessage,
+  public void combine(WritableComparable vertexIndex, FloatWritable originalMessage,
       FloatWritable messageToCombine) {
     originalMessage.set(originalMessage.get() + messageToCombine.get());
   }

http://git-wip-us.apache.org/repos/asf/giraph/blob/414ef89e/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumDoubleMessageCombiner.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumDoubleMessageCombiner.java
b/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumDoubleMessageCombiner.java
index a1f4bd7..ebd9f0a 100644
--- a/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumDoubleMessageCombiner.java
+++ b/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumDoubleMessageCombiner.java
@@ -19,16 +19,16 @@
 package org.apache.giraph.combiner;
 
 import org.apache.hadoop.io.DoubleWritable;
-import org.apache.hadoop.io.LongWritable;
+import org.apache.hadoop.io.WritableComparable;
 
 /**
  * MessageCombiner which finds the minimum of {@link DoubleWritable}.
  */
 public class MinimumDoubleMessageCombiner
     extends
-    MessageCombiner<LongWritable, DoubleWritable> {
+    MessageCombiner<WritableComparable, DoubleWritable> {
   @Override
-  public void combine(LongWritable vertexIndex, DoubleWritable originalMessage,
+  public void combine(WritableComparable vertexIndex, DoubleWritable originalMessage,
       DoubleWritable messageToCombine) {
     if (originalMessage.get() > messageToCombine.get()) {
       originalMessage.set(messageToCombine.get());

http://git-wip-us.apache.org/repos/asf/giraph/blob/414ef89e/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumIntMessageCombiner.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumIntMessageCombiner.java
b/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumIntMessageCombiner.java
index 227c6e6..0aec90a 100644
--- a/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumIntMessageCombiner.java
+++ b/giraph-core/src/main/java/org/apache/giraph/combiner/MinimumIntMessageCombiner.java
@@ -19,14 +19,15 @@
 package org.apache.giraph.combiner;
 
 import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.io.WritableComparable;
 
 /**
  * {@link MessageCombiner} that finds the minimum {@link IntWritable}
  */
 public class MinimumIntMessageCombiner
-    extends MessageCombiner<IntWritable, IntWritable> {
+    extends MessageCombiner<WritableComparable, IntWritable> {
   @Override
-  public void combine(IntWritable vertexIndex, IntWritable originalMessage,
+  public void combine(WritableComparable vertexIndex, IntWritable originalMessage,
       IntWritable messageToCombine) {
     if (originalMessage.get() > messageToCombine.get()) {
       originalMessage.set(messageToCombine.get());

http://git-wip-us.apache.org/repos/asf/giraph/blob/414ef89e/giraph-core/src/main/java/org/apache/giraph/combiner/SimpleSumMessageCombiner.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/combiner/SimpleSumMessageCombiner.java
b/giraph-core/src/main/java/org/apache/giraph/combiner/SimpleSumMessageCombiner.java
index 1b4f5ef..cd00fbb 100644
--- a/giraph-core/src/main/java/org/apache/giraph/combiner/SimpleSumMessageCombiner.java
+++ b/giraph-core/src/main/java/org/apache/giraph/combiner/SimpleSumMessageCombiner.java
@@ -19,16 +19,16 @@
 package org.apache.giraph.combiner;
 
 import org.apache.hadoop.io.IntWritable;
-import org.apache.hadoop.io.LongWritable;
+import org.apache.hadoop.io.WritableComparable;
 
 /**
  * MessageCombiner which sums up {@link IntWritable} message values.
  */
 public class SimpleSumMessageCombiner
-    extends MessageCombiner<LongWritable, IntWritable> {
+    extends MessageCombiner<WritableComparable, IntWritable> {
 
   @Override
-  public void combine(LongWritable vertexIndex, IntWritable originalMessage,
+  public void combine(WritableComparable vertexIndex, IntWritable originalMessage,
       IntWritable messageToCombine) {
     originalMessage.set(originalMessage.get() + messageToCombine.get());
   }


Mime
View raw message