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 da3c7b2
Date Fri, 03 Oct 2014 00:37:48 GMT
Repository: giraph
Updated Branches:
  refs/heads/trunk 414ef89eb -> da3c7b2d6


Fix tests


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

Branch: refs/heads/trunk
Commit: da3c7b2d648fa270b997e514933dfc081ae7810b
Parents: 414ef89
Author: Maja Kabiljo <majakabiljo@fb.com>
Authored: Thu Oct 2 17:37:23 2014 -0700
Committer: Maja Kabiljo <majakabiljo@fb.com>
Committed: Thu Oct 2 17:37:23 2014 -0700

----------------------------------------------------------------------
 .../combiner/DoubleSumMessageCombiner.java      |  4 +--
 .../combiner/FloatSumMessageCombiner.java       |  4 +--
 .../combiner/MinimumDoubleMessageCombiner.java  |  4 +--
 .../combiner/MinimumIntMessageCombiner.java     |  4 +--
 .../combiner/SimpleSumMessageCombiner.java      |  4 +--
 .../primitives/IntFloatMessageStore.java        | 35 ++++++++++----------
 .../primitives/LongDoubleMessageStore.java      | 32 +++++++++---------
 .../giraph/examples/MinimumIntCombinerTest.java |  7 ++--
 8 files changed, 47 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/giraph/blob/da3c7b2d/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 c7c97a4..04f6bdf 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
@@ -28,8 +28,8 @@ public class DoubleSumMessageCombiner
     extends
     MessageCombiner<WritableComparable, DoubleWritable> {
   @Override
-  public void combine(WritableComparable vertexIndex, DoubleWritable originalMessage,
-      DoubleWritable messageToCombine) {
+  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/da3c7b2d/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 0bbea4e..3015e2b 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
@@ -28,8 +28,8 @@ public class FloatSumMessageCombiner
     extends
     MessageCombiner<WritableComparable, FloatWritable> {
   @Override
-  public void combine(WritableComparable vertexIndex, FloatWritable originalMessage,
-      FloatWritable messageToCombine) {
+  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/da3c7b2d/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 ebd9f0a..db43008 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
@@ -28,8 +28,8 @@ public class MinimumDoubleMessageCombiner
     extends
     MessageCombiner<WritableComparable, DoubleWritable> {
   @Override
-  public void combine(WritableComparable vertexIndex, DoubleWritable originalMessage,
-      DoubleWritable messageToCombine) {
+  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/da3c7b2d/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 0aec90a..df80b8f 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
@@ -27,8 +27,8 @@ import org.apache.hadoop.io.WritableComparable;
 public class MinimumIntMessageCombiner
     extends MessageCombiner<WritableComparable, IntWritable> {
   @Override
-  public void combine(WritableComparable vertexIndex, IntWritable originalMessage,
-      IntWritable messageToCombine) {
+  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/da3c7b2d/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 cd00fbb..e3ae597 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
@@ -28,8 +28,8 @@ public class SimpleSumMessageCombiner
     extends MessageCombiner<WritableComparable, IntWritable> {
 
   @Override
-  public void combine(WritableComparable vertexIndex, IntWritable originalMessage,
-      IntWritable messageToCombine) {
+  public void combine(WritableComparable vertexIndex,
+      IntWritable originalMessage, IntWritable messageToCombine) {
     originalMessage.set(originalMessage.get() + messageToCombine.get());
   }
 

http://git-wip-us.apache.org/repos/asf/giraph/blob/da3c7b2d/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntFloatMessageStore.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntFloatMessageStore.java
b/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntFloatMessageStore.java
index 97086e1..8095ad6 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntFloatMessageStore.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/IntFloatMessageStore.java
@@ -18,33 +18,32 @@
 
 package org.apache.giraph.comm.messages.primitives;
 
+import it.unimi.dsi.fastutil.ints.Int2FloatMap;
+import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap;
+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
+import it.unimi.dsi.fastutil.ints.IntIterator;
+import it.unimi.dsi.fastutil.objects.ObjectIterator;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+
 import org.apache.giraph.bsp.CentralizedServiceWorker;
 import org.apache.giraph.combiner.MessageCombiner;
 import org.apache.giraph.comm.messages.MessageStore;
 import org.apache.giraph.partition.Partition;
 import org.apache.giraph.partition.PartitionStore;
-
+import org.apache.giraph.utils.EmptyIterable;
 import org.apache.giraph.utils.VertexIdMessageIterator;
 import org.apache.giraph.utils.VertexIdMessages;
-import org.apache.giraph.utils.EmptyIterable;
 import org.apache.hadoop.io.FloatWritable;
 import org.apache.hadoop.io.IntWritable;
 import org.apache.hadoop.io.Writable;
 
 import com.google.common.collect.Lists;
 
-import it.unimi.dsi.fastutil.ints.Int2FloatMap;
-import it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap;
-import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
-import it.unimi.dsi.fastutil.ints.IntIterator;
-import it.unimi.dsi.fastutil.objects.ObjectIterator;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
 /**
  * Special message store to be used when ids are IntWritable and messages
  * are FloatWritable and messageCombiner is used.
@@ -56,7 +55,8 @@ public class IntFloatMessageStore
   /** Map from partition id to map from vertex id to message */
   private final Int2ObjectOpenHashMap<Int2FloatOpenHashMap> map;
   /** Message messageCombiner */
-  private final MessageCombiner<IntWritable, FloatWritable> messageCombiner;
+  private final
+  MessageCombiner<? super IntWritable, FloatWritable> messageCombiner;
   /** Service worker */
   private final CentralizedServiceWorker<IntWritable, ?, ?> service;
 
@@ -68,10 +68,9 @@ public class IntFloatMessageStore
    */
   public IntFloatMessageStore(
       CentralizedServiceWorker<IntWritable, Writable, Writable> service,
-      MessageCombiner<IntWritable, FloatWritable> messageCombiner) {
+      MessageCombiner<? super IntWritable, FloatWritable> messageCombiner) {
     this.service = service;
-    this.messageCombiner =
-        messageCombiner;
+    this.messageCombiner = messageCombiner;
 
     map = new Int2ObjectOpenHashMap<Int2FloatOpenHashMap>();
     for (int partitionId : service.getPartitionStore().getPartitionIds()) {

http://git-wip-us.apache.org/repos/asf/giraph/blob/da3c7b2d/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/LongDoubleMessageStore.java
----------------------------------------------------------------------
diff --git a/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/LongDoubleMessageStore.java
b/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/LongDoubleMessageStore.java
index b0452c1..dac98c9 100644
--- a/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/LongDoubleMessageStore.java
+++ b/giraph-core/src/main/java/org/apache/giraph/comm/messages/primitives/LongDoubleMessageStore.java
@@ -18,20 +18,6 @@
 
 package org.apache.giraph.comm.messages.primitives;
 
-import org.apache.giraph.bsp.CentralizedServiceWorker;
-import org.apache.giraph.combiner.MessageCombiner;
-import org.apache.giraph.comm.messages.MessageStore;
-import org.apache.giraph.partition.Partition;
-import org.apache.giraph.utils.VertexIdMessageIterator;
-import org.apache.giraph.utils.VertexIdMessages;
-import org.apache.giraph.utils.EmptyIterable;
-import org.apache.hadoop.io.DoubleWritable;
-import org.apache.hadoop.io.LongWritable;
-
-import org.apache.hadoop.io.Writable;
-
-import com.google.common.collect.Lists;
-
 import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
 import it.unimi.dsi.fastutil.longs.Long2DoubleMap;
 import it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap;
@@ -44,6 +30,19 @@ import java.io.IOException;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.giraph.bsp.CentralizedServiceWorker;
+import org.apache.giraph.combiner.MessageCombiner;
+import org.apache.giraph.comm.messages.MessageStore;
+import org.apache.giraph.partition.Partition;
+import org.apache.giraph.utils.EmptyIterable;
+import org.apache.giraph.utils.VertexIdMessageIterator;
+import org.apache.giraph.utils.VertexIdMessages;
+import org.apache.hadoop.io.DoubleWritable;
+import org.apache.hadoop.io.LongWritable;
+import org.apache.hadoop.io.Writable;
+
+import com.google.common.collect.Lists;
+
 /**
  * Special message store to be used when ids are LongWritable and messages
  * are DoubleWritable and messageCombiner is used.
@@ -55,7 +54,8 @@ public class LongDoubleMessageStore
   /** Map from partition id to map from vertex id to message */
   private final Int2ObjectOpenHashMap<Long2DoubleOpenHashMap> map;
   /** Message messageCombiner */
-  private final MessageCombiner<LongWritable, DoubleWritable> messageCombiner;
+  private final
+  MessageCombiner<? super LongWritable, DoubleWritable> messageCombiner;
   /** Service worker */
   private final CentralizedServiceWorker<LongWritable, ?, ?> service;
 
@@ -67,7 +67,7 @@ public class LongDoubleMessageStore
    */
   public LongDoubleMessageStore(
       CentralizedServiceWorker<LongWritable, Writable, Writable> service,
-      MessageCombiner<LongWritable, DoubleWritable> messageCombiner) {
+      MessageCombiner<? super LongWritable, DoubleWritable> messageCombiner) {
     this.service = service;
     this.messageCombiner =
         messageCombiner;

http://git-wip-us.apache.org/repos/asf/giraph/blob/da3c7b2d/giraph-examples/src/test/java/org/apache/giraph/examples/MinimumIntCombinerTest.java
----------------------------------------------------------------------
diff --git a/giraph-examples/src/test/java/org/apache/giraph/examples/MinimumIntCombinerTest.java
b/giraph-examples/src/test/java/org/apache/giraph/examples/MinimumIntCombinerTest.java
index aa6cd8a..50a7130 100644
--- a/giraph-examples/src/test/java/org/apache/giraph/examples/MinimumIntCombinerTest.java
+++ b/giraph-examples/src/test/java/org/apache/giraph/examples/MinimumIntCombinerTest.java
@@ -18,18 +18,19 @@
 
 package org.apache.giraph.examples;
 
+import static org.junit.Assert.assertEquals;
+
 import org.apache.giraph.combiner.MessageCombiner;
 import org.apache.giraph.combiner.MinimumIntMessageCombiner;
 import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.io.WritableComparable;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-
 public class MinimumIntCombinerTest {
 
   @Test
   public void testCombiner() throws Exception {
-    MessageCombiner<IntWritable, IntWritable>
+    MessageCombiner<WritableComparable, IntWritable>
         messageCombiner =
         new MinimumIntMessageCombiner();
 


Mime
View raw message