public class SeqFileWriter extends Object implements ChukwaWriter
ChukwaWriter.COMMIT_PENDING, ChukwaWriter.CommitStatus| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.fs.FSDataOutputStream |
currentOutputStr |
static boolean |
ENABLE_ROTATION_ON_CLOSE |
protected boolean |
isRunning |
static String |
OUTPUT_DIR_OPT |
static String |
ROTATE_INTERVAL_OPT |
protected Timer |
rotateTimer |
static String |
STAT_PERIOD_OPT |
protected Timer |
statTimer |
COMMIT_FAIL, COMMIT_OK| Constructor and Description |
|---|
SeqFileWriter() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected void |
computeTimePeriod() |
long |
getBytesWritten() |
void |
init(org.apache.hadoop.conf.Configuration conf)
Called once to initialize this writer.
|
public static boolean ENABLE_ROTATION_ON_CLOSE
public static final String STAT_PERIOD_OPT
public static final String ROTATE_INTERVAL_OPT
public static final String OUTPUT_DIR_OPT
protected org.apache.hadoop.fs.FSDataOutputStream currentOutputStr
protected Timer rotateTimer
protected Timer statTimer
protected volatile boolean isRunning
public long getBytesWritten()
public void init(org.apache.hadoop.conf.Configuration conf)
throws WriterException
ChukwaWriterinit in interface ChukwaWriterWriterExceptionprotected void computeTimePeriod()
public ChukwaWriter.CommitStatus add(List<Chunk> chunks) throws WriterException
ChukwaWriteradd in interface ChukwaWriterWriterExceptionpublic void close()
ChukwaWriterclose in interface ChukwaWriterCopyright © ${year} The Apache Software Foundation