public class GoraWriter extends PipelineableWriter
ChukwaChunk's.ChukwaWriter.COMMIT_PENDING, ChukwaWriter.CommitStatusCOMMIT_FAIL, COMMIT_OK| Constructor and Description |
|---|
GoraWriter()
Default constructor for this class.
|
| Modifier and Type | Method and Description |
|---|---|
ChukwaWriter.CommitStatus |
add(List<Chunk> chunks)
Called repeatedly with data that should be serialized.
|
void |
close()
If the
DataStore instance is not null, we
execute a DataStore.flush(). |
void |
init(org.apache.hadoop.conf.Configuration c)
DataStore objects are created from a factory. |
setNextStagepublic GoraWriter()
throws WriterException
WriterException - if error writingpublic void init(org.apache.hadoop.conf.Configuration c)
throws WriterException
DataStore objects are created from a factory. It is necessary to
provide the key and value class. The datastore class parameters is optional,
and if not specified it will be read from the gora.properties file.c - is Chukwa configurationWriterException - if error occursChukwaWriter.init(org.apache.hadoop.conf.Configuration)public void close()
throws WriterException
If the DataStore instance is not null, we
execute a DataStore.flush(). This forces
the write caches to be flushed. DataStore implementations may optimize
their writing by deferring the actual put / delete operations until
this moment.
Otherwise, we utilize DataStore.close()
which closes the DataStore. This should release any resources held by
the implementation, so that the instance is ready for GC. All other
DataStore methods cannot be used after this method was called.
Subsequent calls of this method are ignored.
WriterException - if error writing dataChukwaWriter.close()public ChukwaWriter.CommitStatus add(List<Chunk> chunks) throws WriterException
ChukwaWriteradd in interface ChukwaWriteradd in class PipelineableWriterchunks - is a list of data to sendWriterException - if error writing dataCopyright © 2016 Apache Software Foundation. All Rights Reserved.