Package org.apache.storm.hdfs.bolt
Class HdfsBolt
- java.lang.Object
-
- org.apache.storm.topology.base.BaseComponent
-
- org.apache.storm.topology.base.BaseRichBolt
-
- org.apache.storm.hdfs.bolt.AbstractHdfsBolt
-
- org.apache.storm.hdfs.bolt.HdfsBolt
-
- All Implemented Interfaces:
Serializable,IBolt,IComponent,IRichBolt
public class HdfsBolt extends AbstractHdfsBolt
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.storm.hdfs.bolt.AbstractHdfsBolt
collector, configKey, fileNameFormat, fileRetryCount, fs, fsUrl, hdfsConfig, maxOpenFiles, offset, partitioner, rotationActions, rotationCounterMap, rotationPolicy, rotationTimer, syncPolicy, tickTupleInterval, writeLock, writers
-
-
Constructor Summary
Constructors Constructor Description HdfsBolt()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HdfsBoltaddRotationAction(RotationAction action)voiddoPrepare(Map<String,Object> conf, TopologyContext topologyContext, OutputCollector collector)protected StringgetWriterKey(Tuple tuple)protected AbstractHDFSWritermakeNewWriter(org.apache.hadoop.fs.Path path, Tuple tuple)HdfsBoltwithConfigKey(String configKey)HdfsBoltwithFileNameFormat(FileNameFormat fileNameFormat)HdfsBoltwithFsUrl(String fsUrl)HdfsBoltwithMaxOpenFiles(int maxOpenFiles)HdfsBoltwithPartitioner(Partitioner partitioner)HdfsBoltwithRecordFormat(RecordFormat format)HdfsBoltwithRetryCount(int fileRetryCount)HdfsBoltwithRotationPolicy(FileRotationPolicy rotationPolicy)HdfsBoltwithSyncPolicy(SyncPolicy syncPolicy)HdfsBoltwithTickTupleIntervalSeconds(int interval)-
Methods inherited from class org.apache.storm.hdfs.bolt.AbstractHdfsBolt
cleanup, declareOutputFields, execute, getBasePathForNextFile, getComponentConfiguration, prepare, rotateOutputFile
-
-
-
-
Method Detail
-
withFileNameFormat
public HdfsBolt withFileNameFormat(FileNameFormat fileNameFormat)
-
withRecordFormat
public HdfsBolt withRecordFormat(RecordFormat format)
-
withSyncPolicy
public HdfsBolt withSyncPolicy(SyncPolicy syncPolicy)
-
withRotationPolicy
public HdfsBolt withRotationPolicy(FileRotationPolicy rotationPolicy)
-
addRotationAction
public HdfsBolt addRotationAction(RotationAction action)
-
withTickTupleIntervalSeconds
public HdfsBolt withTickTupleIntervalSeconds(int interval)
-
withRetryCount
public HdfsBolt withRetryCount(int fileRetryCount)
-
withPartitioner
public HdfsBolt withPartitioner(Partitioner partitioner)
-
withMaxOpenFiles
public HdfsBolt withMaxOpenFiles(int maxOpenFiles)
-
doPrepare
public void doPrepare(Map<String,Object> conf, TopologyContext topologyContext, OutputCollector collector) throws IOException
- Specified by:
doPreparein classAbstractHdfsBolt- Throws:
IOException
-
getWriterKey
protected String getWriterKey(Tuple tuple)
- Specified by:
getWriterKeyin classAbstractHdfsBolt
-
makeNewWriter
protected AbstractHDFSWriter makeNewWriter(org.apache.hadoop.fs.Path path, Tuple tuple) throws IOException
- Specified by:
makeNewWriterin classAbstractHdfsBolt- Throws:
IOException
-
-