org.apache.hadoop.chukwa.datacollection.test
Class FilePerPostWriter
java.lang.Object
org.apache.hadoop.chukwa.datacollection.writer.PipelineableWriter
org.apache.hadoop.chukwa.datacollection.writer.SeqFileWriter
org.apache.hadoop.chukwa.datacollection.test.FilePerPostWriter
- All Implemented Interfaces:
- ChukwaWriter
public class FilePerPostWriter
- extends SeqFileWriter
A writer that writes a file for each post. Intended ONLY for architectural
performance comparisons. Do not use this in production.
Fields inherited from class org.apache.hadoop.chukwa.datacollection.writer.SeqFileWriter |
bytesThisRotate, currentOutputStr, dataSize, ENABLE_ROTATION_ON_CLOSE, isRunning, localHostAddr, lock, nextTimePeriodComputation, OUTPUT_DIR_OPT, ROTATE_INTERVAL_OPT, rotateTimer, seqFileWriter, STAT_INTERVAL_SECONDS, STAT_PERIOD_OPT, statTimer, timePeriod |
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 conf)
Called once to initialize this writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fs
protected org.apache.hadoop.fs.FileSystem fs
conf
protected org.apache.hadoop.conf.Configuration conf
outputDir
protected String outputDir
currentPath
protected org.apache.hadoop.fs.Path currentPath
currentFileName
protected String currentFileName
FilePerPostWriter
public FilePerPostWriter()
add
public ChukwaWriter.CommitStatus add(List<Chunk> chunks)
throws WriterException
- Description copied from interface:
ChukwaWriter
- 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().
- Specified by:
add
in interface ChukwaWriter
- Overrides:
add
in class SeqFileWriter
- Returns:
-
- Throws:
WriterException
close
public void close()
- Description copied from interface:
ChukwaWriter
- Called once, indicating that the writer should close files and prepare
to exit.
- Specified by:
close
in interface ChukwaWriter
- Overrides:
close
in class SeqFileWriter
init
public void init(org.apache.hadoop.conf.Configuration conf)
throws WriterException
- Description copied from interface:
ChukwaWriter
- Called once to initialize this writer.
- Specified by:
init
in interface ChukwaWriter
- Overrides:
init
in class SeqFileWriter
- Throws:
WriterException
Copyright © ${year} The Apache Software Foundation