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
ChukwaWriter
init
in interface ChukwaWriter
WriterException
protected void computeTimePeriod()
public ChukwaWriter.CommitStatus add(List<Chunk> chunks) throws WriterException
ChukwaWriter
add
in interface ChukwaWriter
WriterException
public void close()
ChukwaWriter
close
in interface ChukwaWriter
Copyright © ${year} The Apache Software Foundation