You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@giraph.apache.org by cl...@apache.org on 2012/01/06 20:13:03 UTC
svn commit: r1228356 - in /incubator/giraph/trunk: ./
src/main/java/org/apache/giraph/examples/
src/main/java/org/apache/giraph/graph/ src/test/java/org/apache/giraph/
Author: claudio
Date: Fri Jan 6 19:13:03 2012
New Revision: 1228356
URL: http://svn.apache.org/viewvc?rev=1228356&view=rev
Log:
GIRAPH-119: VertexCombiner should work on Iterable<M> instead of List<M>
Modified:
incubator/giraph/trunk/CHANGELOG
incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/MinimumIntCombiner.java
incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/SimpleSumCombiner.java
incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/VertexCombiner.java
incubator/giraph/trunk/src/test/java/org/apache/giraph/TestVertexTypes.java
Modified: incubator/giraph/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/CHANGELOG?rev=1228356&r1=1228355&r2=1228356&view=diff
==============================================================================
--- incubator/giraph/trunk/CHANGELOG (original)
+++ incubator/giraph/trunk/CHANGELOG Fri Jan 6 19:13:03 2012
@@ -2,6 +2,9 @@ Giraph Change Log
Release 0.70.0 - unreleased
+ GIRAPH-119: VertexCombiner should work on Iterable<M> instead of
+ List<M>. (claudio)
+
GIRAPH-116: Make EdgeListVertex the default vertex implementation,
fix bugs related to EdgeListVertex. (aching)
Modified: incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/MinimumIntCombiner.java
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/MinimumIntCombiner.java?rev=1228356&r1=1228355&r2=1228356&view=diff
==============================================================================
--- incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/MinimumIntCombiner.java (original)
+++ incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/MinimumIntCombiner.java Fri Jan 6 19:13:03 2012
@@ -32,7 +32,7 @@ public class MinimumIntCombiner
@Override
public IntWritable combine(IntWritable target,
- List<IntWritable> messages) throws IOException {
+ Iterable<IntWritable> messages) throws IOException {
int minimum = Integer.MAX_VALUE;
for (IntWritable message : messages) {
if (message.get() < minimum) {
Modified: incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/SimpleSumCombiner.java
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/SimpleSumCombiner.java?rev=1228356&r1=1228355&r2=1228356&view=diff
==============================================================================
--- incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/SimpleSumCombiner.java (original)
+++ incubator/giraph/trunk/src/main/java/org/apache/giraph/examples/SimpleSumCombiner.java Fri Jan 6 19:13:03 2012
@@ -34,10 +34,10 @@ public class SimpleSumCombiner
@Override
public IntWritable combine(LongWritable vertexIndex,
- List<IntWritable> msgList)
+ Iterable<IntWritable> messages)
throws IOException {
int sum = 0;
- for (IntWritable msg : msgList) {
+ for (IntWritable msg : messages) {
sum += msg.get();
}
return new IntWritable(sum);
Modified: incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/VertexCombiner.java
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/VertexCombiner.java?rev=1228356&r1=1228355&r2=1228356&view=diff
==============================================================================
--- incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/VertexCombiner.java (original)
+++ incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/VertexCombiner.java Fri Jan 6 19:13:03 2012
@@ -19,9 +19,7 @@
package org.apache.giraph.graph;
import java.io.IOException;
-import java.util.List;
-import org.apache.giraph.comm.MsgList;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparable;
@@ -39,11 +37,11 @@ public abstract class VertexCombiner<I e
* Combines message values for a particular vertex index.
*
* @param vertexIndex Index of the vertex getting these messages
- * @param msgList List of the messages to be combined
- * @return Message that is combined from {@link MsgList} or null if no
+ * @param messages Iterable of the messages to be combined
+ * @return Message that is combined from {@link messages} or null if no
* message it to be sent
* @throws IOException
*/
public abstract M combine(I vertexIndex,
- List<M> msgList) throws IOException;
+ Iterable<M> messages) throws IOException;
}
Modified: incubator/giraph/trunk/src/test/java/org/apache/giraph/TestVertexTypes.java
URL: http://svn.apache.org/viewvc/incubator/giraph/trunk/src/test/java/org/apache/giraph/TestVertexTypes.java?rev=1228356&r1=1228355&r2=1228356&view=diff
==============================================================================
--- incubator/giraph/trunk/src/test/java/org/apache/giraph/TestVertexTypes.java (original)
+++ incubator/giraph/trunk/src/test/java/org/apache/giraph/TestVertexTypes.java Fri Jan 6 19:13:03 2012
@@ -83,7 +83,7 @@ public class TestVertexTypes
@Override
public FloatWritable combine(LongWritable vertexIndex,
- List<FloatWritable> msgList)
+ Iterable<FloatWritable> msgList)
throws IOException {
return null;
}
@@ -97,7 +97,7 @@ public class TestVertexTypes
@Override
public DoubleWritable combine(LongWritable vertexIndex,
- List<DoubleWritable> msgList)
+ Iterable<DoubleWritable> msgList)
throws IOException {
return null;
}