This project has retired. For details please refer to its Attic page.
InMemoryEmitter (Apache Crunch 0.9.0 API)

org.apache.crunch.impl.mem.emit
Class InMemoryEmitter<T>

java.lang.Object
  extended by org.apache.crunch.impl.mem.emit.InMemoryEmitter<T>
Type Parameters:
T -
All Implemented Interfaces:
Emitter<T>

public class InMemoryEmitter<T>
extends Object
implements Emitter<T>

An Emitter instance that writes emitted records to a backing List.


Constructor Summary
InMemoryEmitter()
           
InMemoryEmitter(List<T> output)
           
 
Method Summary
 void emit(T emitted)
          Write the emitted value to the next stage of the pipeline.
 void flush()
          Flushes any values cached by this emitter.
 List<T> getOutput()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryEmitter

public InMemoryEmitter()

InMemoryEmitter

public InMemoryEmitter(List<T> output)
Method Detail

emit

public void emit(T emitted)
Description copied from interface: Emitter
Write the emitted value to the next stage of the pipeline.

Specified by:
emit in interface Emitter<T>
Parameters:
emitted - The value to write

flush

public void flush()
Description copied from interface: Emitter
Flushes any values cached by this emitter. Called during the cleanup stage.

Specified by:
flush in interface Emitter<T>

getOutput

public List<T> getOutput()


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.