Github user spupyrev commented on a diff in the pull request:

    https://github.com/apache/giraph/pull/82#discussion_r239885127
  
    --- Diff: 
giraph-examples/src/main/java/org/apache/giraph/examples/feature_diffusion_utils/labeling/KCoreLabelingMigrationSimulationComputation.java
 ---
    @@ -0,0 +1,86 @@
    +package org.apache.giraph.examples.feature_diffusion_utils.labeling;
    +
    +import 
org.apache.giraph.block_app.migration.MigrationAbstractComputation.MigrationFullBasicComputation;
    +import org.apache.giraph.bsp.CentralizedServiceWorker;
    +import org.apache.giraph.comm.WorkerClientRequestProcessor;
    +import org.apache.giraph.graph.GraphState;
    +import org.apache.giraph.graph.Vertex;
    +import org.apache.giraph.worker.WorkerGlobalCommUsage;
    +import org.apache.hadoop.io.IntWritable;
    +import org.apache.hadoop.io.LongWritable;
    +import org.apache.hadoop.io.MapWritable;
    +import org.apache.hadoop.io.NullWritable;
    +import org.apache.hadoop.io.Text;
    +import org.apache.hadoop.io.Writable;
    +import org.apache.log4j.Logger;
    +
    +
    +import java.io.IOException;
    +import java.util.HashMap;
    +import java.util.Iterator;
    +import java.util.Map.Entry;
    +
    +import org.apache.giraph.examples.feature_diffusion_utils.datastructures.*;
    +
    +@SuppressWarnings("unused")
    +public class KCoreLabelingMigrationSimulationComputation extends 
MigrationFullBasicComputation<LongWritable,LabelingVertexValue, NullWritable, 
Text> {
    +
    +   Logger LOG = Logger.getLogger(this.getClass());
    +
    +
    +   /*public void initialize(GraphState graphState,
    +                   WorkerClientRequestProcessor<LongWritable, 
DiffusionVertexValue, NullWritable> workerClientRequestProcessor,
    +                   CentralizedServiceWorker<LongWritable, 
DiffusionVertexValue, NullWritable> serviceWorker,
    +                   WorkerGlobalCommUsage workerGlobalCommUsage) {
    +           super.initialize(graphState, workerClientRequestProcessor, 
serviceWorker, workerGlobalCommUsage);
    +           delta = 
getConf().getDouble(DiffusionMasterCompute.diffusionDeltaOption, 
DiffusionMasterCompute.diffusionDeltaOptionDefault);
    +           modelSwitch = 
getConf().getBoolean(DiffusionMasterCompute.diffusionListenOption, false);
    +
    +   }*/
    +
    +   @Override
    +   public void compute(Vertex<LongWritable, LabelingVertexValue, 
NullWritable> vertex, Iterable<Text> msgs)
    --- End diff --
    
    Let's send typed messages, e.g., LongLongWritable in this case.


---

Reply via email to