public class InMemoryWriter extends Object implements ChukwaWriter
ChukwaWriter.COMMIT_PENDING, ChukwaWriter.CommitStatusCOMMIT_FAIL, COMMIT_OK| Constructor and Description |
|---|
InMemoryWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Chunk data) |
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 conf)
Called once to initialize this writer.
|
Chunk |
readOutChunk(int bytes,
int ms)
Try to read bytes, waiting up to ms
|
public void close()
ChukwaWriterclose in interface ChukwaWriterpublic void init(org.apache.hadoop.conf.Configuration conf)
throws WriterException
ChukwaWriterinit in interface ChukwaWriterconf - is Chukwa configurationWriterException - if error writing datapublic void add(Chunk data) throws WriterException
WriterExceptionpublic ChukwaWriter.CommitStatus add(List<Chunk> chunks) throws WriterException
ChukwaWriteradd in interface ChukwaWriterchunks - is a list of data to sendWriterException - if error writing datapublic Chunk readOutChunk(int bytes, int ms) throws IOException
bytes - amount to try to readms - time to waitIOException - if error reading dataCopyright © 2016 Apache Software Foundation. All Rights Reserved.