org.apache.hadoop.chukwa.datacollection.writer
Interface ChukwaWriter

All Known Implementing Classes:
ConsoleWriter, Dedup, ExtractorWriter, FilePerPostWriter, HBaseWriter, InMemoryWriter, LocalWriter, NullWriter, PipelineableWriter, PipelineStageWriter, SeqFileWriter, SocketTeeWriter

public interface ChukwaWriter


Nested Class Summary
static class ChukwaWriter.COMMIT_PENDING
          COMMIT_PENDING should be returned if a writer has written data, but this data may ultimately disappear.
static class ChukwaWriter.CommitStatus
           
 
Field Summary
static ChukwaWriter.CommitStatus COMMIT_FAIL
           
static ChukwaWriter.CommitStatus COMMIT_OK
           
 
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.
 

Field Detail

COMMIT_OK

static final ChukwaWriter.CommitStatus COMMIT_OK

COMMIT_FAIL

static final ChukwaWriter.CommitStatus COMMIT_FAIL
Method Detail

init

void init(org.apache.hadoop.conf.Configuration c)
          throws WriterException
Called once to initialize this writer.

Parameters:
c -
Throws:
WriterException

add

ChukwaWriter.CommitStatus add(List<Chunk> chunks)
                              throws WriterException
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().

Parameters:
chunks -
Returns:
Throws:
WriterException

close

void close()
           throws WriterException
Called once, indicating that the writer should close files and prepare to exit.

Throws:
WriterException


Copyright © 2011 Apache Software Foundation. All Rights Reserved.