Class GraphComputerTest.MapReduceC

    • Constructor Detail

      • MapReduceC

        public MapReduceC()
    • Method Detail

      • doStage

        public boolean doStage​(MapReduce.Stage stage)
        Description copied from interface: MapReduce
        A MapReduce job can be map-only, map-reduce-only, or map-combine-reduce. Before executing the particular stage, this method is called to determine if the respective stage is defined. This method should return true if the respective stage as a non-default method implementation.
        stage - the stage to check for definition.
        whether that stage should be executed.
      • map

        public void map​(Vertex vertex,
                        MapReduce.MapEmitter<MapReduce.NullObject,​MapReduce.NullObject> emitter)
        Description copied from interface: MapReduce
        The map() method is logically executed at all vertices in the graph in parallel. The map() method emits key/value pairs given some analysis of the data in the vertices (and/or its incident edges). All MapReduce classes must at least provide an implementation of MapReduce#map(Vertex, MapEmitter).
        vertex - the current vertex being map() processed.
        emitter - the component that allows for key/value pairs to be emitted to the next stage.
      • getMemoryKey

        public String getMemoryKey()
        Description copied from interface: MapReduce
        The results of the MapReduce job are associated with a memory-key to ultimately be stored in Memory.
        the memory key of the generated result object.
      • generateFinalResult

        public MapReduce.NullObject generateFinalResult​(Iterator<KeyValue<MapReduce.NullObject,​MapReduce.NullObject>> keyValues)
        Description copied from interface: MapReduce
        The key/value pairs emitted by reduce() (or map() in a map-only job) can be iterated to generate a local JVM Java object.
        keyValues - the key/value pairs that were emitted from reduce() (or map() in a map-only job)
        the resultant object formed from the emitted key/values.