Package org.apache.giraph.combiner

Examples of org.apache.giraph.combiner.MinimumIntMessageCombiner


  @Test
  public void testCombiner() throws Exception {
    MessageCombiner<WritableComparable, IntWritable>
        messageCombiner =
        new MinimumIntMessageCombiner();

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

TOP

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

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.