org.apache.hadoop.chukwa.datacollection.writer
Class NullWriter

java.lang.Object
  extended by org.apache.hadoop.chukwa.datacollection.writer.NullWriter
All Implemented Interfaces:
ChukwaWriter

public class NullWriter
extends Object
implements ChukwaWriter

Minimal writer; does nothing with data. Useful primarily as an end-of-pipeline stage, if stuff in the middle is accomplishing something useful.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.hadoop.chukwa.datacollection.writer.ChukwaWriter
ChukwaWriter.COMMIT_PENDING, ChukwaWriter.CommitStatus
 
Field Summary
static String RATE_OPT_NAME
           
 
Fields inherited from interface org.apache.hadoop.chukwa.datacollection.writer.ChukwaWriter
COMMIT_FAIL, COMMIT_OK
 
Constructor Summary
NullWriter()
           
 
Method Summary
 ChukwaWriter.CommitStatus add(List<Chunk> chunks)
          Called repeatedly with data that should be serialized.
 void close()
          Called once, indicating that the writer should close files and prepare to exit.
 void init(org.apache.hadoop.conf.Configuration c)
          Called once to initialize this writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RATE_OPT_NAME

public static final String RATE_OPT_NAME
See Also:
Constant Field Values
Constructor Detail

NullWriter

public NullWriter()
Method Detail

add

public ChukwaWriter.CommitStatus add(List<Chunk> chunks)
                              throws WriterException
Description copied from interface: ChukwaWriter
Called repeatedly with data that should be serialized. Subclasses may assume that init() will be called before any calls to add(), and that add() won't be called after close().

Specified by:
add in interface ChukwaWriter
Returns:
Throws:
WriterException

close

public void close()
           throws WriterException
Description copied from interface: ChukwaWriter
Called once, indicating that the writer should close files and prepare to exit.

Specified by:
close in interface ChukwaWriter
Throws:
WriterException

init

public void init(org.apache.hadoop.conf.Configuration c)
          throws WriterException
Description copied from interface: ChukwaWriter
Called once to initialize this writer.

Specified by:
init in interface ChukwaWriter
Throws:
WriterException


Copyright © ${year} The Apache Software Foundation