public class SequenceFileBolt extends AbstractHdfsBolt
collector, configKey, fileNameFormat, fileRetryCount, fs, fsUrl, hdfsConfig, offset, rotation, rotationActions, rotationPolicy, rotationTimer, syncPolicy, tickTupleInterval, writeLock| Constructor and Description |
|---|
SequenceFileBolt() |
cleanup, declareOutputFields, execute, getComponentConfiguration, prepare, rotateOutputFilepublic SequenceFileBolt withCompressionCodec(String codec)
public SequenceFileBolt withFsUrl(String fsUrl)
public SequenceFileBolt withConfigKey(String configKey)
public SequenceFileBolt withFileNameFormat(FileNameFormat fileNameFormat)
public SequenceFileBolt withSequenceFormat(SequenceFormat format)
public SequenceFileBolt withSyncPolicy(SyncPolicy syncPolicy)
public SequenceFileBolt withRotationPolicy(FileRotationPolicy rotationPolicy)
public SequenceFileBolt withCompressionType(org.apache.hadoop.io.SequenceFile.CompressionType compressionType)
public SequenceFileBolt withTickTupleIntervalSeconds(int interval)
public SequenceFileBolt addRotationAction(RotationAction action)
public SequenceFileBolt withRetryCount(int fileRetryCount)
public void doPrepare(Map conf, TopologyContext topologyContext, OutputCollector collector) throws IOException
doPrepare in class AbstractHdfsBoltIOExceptionprotected void syncTuples()
throws IOException
AbstractHdfsBoltMake the best effort to sync written data to the underlying file system. Concrete classes should very clearly state the file state that sync guarantees. For example, HdfsBolt can make a much stronger guarantee than SequenceFileBolt.
syncTuples in class AbstractHdfsBoltIOExceptionprotected void writeTuple(Tuple tuple) throws IOException
AbstractHdfsBoltwrites a tuple to the underlying filesystem but makes no guarantees about syncing data.
this.offset is also updated to reflect additional data written
writeTuple in class AbstractHdfsBoltIOExceptionprotected org.apache.hadoop.fs.Path createOutputFile()
throws IOException
createOutputFile in class AbstractHdfsBoltIOExceptionprotected void closeOutputFile()
throws IOException
closeOutputFile in class AbstractHdfsBoltIOExceptionCopyright © 2018 The Apache Software Foundation. All Rights Reserved.