Package org.apache.giraph.combiner

Examples of org.apache.giraph.combiner.MinimumIntCombiner


public class MinimumIntCombinerTest {

  @Test
  public void testCombiner() throws Exception {
    Combiner<IntWritable, IntWritable> combiner =
        new MinimumIntCombiner();

    IntWritable vertexId = new IntWritable(1);
    IntWritable result = combiner.createInitialMessage();
    combiner.combine(vertexId, result, new IntWritable(39947466));
    combiner.combine(vertexId, result, new IntWritable(199));
    combiner.combine(vertexId, result, new IntWritable(42));
    combiner.combine(vertexId, result, new IntWritable(19998888));
    assertEquals(42, result.get());
  }
View Full Code Here

TOP

Related Classes of org.apache.giraph.combiner.MinimumIntCombiner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.