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 HdfsBolt
addRotationAction(RotationAction action)
void
doPrepare(Map<String,Object> conf, TopologyContext topologyContext, OutputCollector collector)
protected String
getWriterKey(Tuple tuple)
protected AbstractHDFSWriter
makeNewWriter(org.apache.hadoop.fs.Path path, Tuple tuple)
HdfsBolt
withConfigKey(String configKey)
HdfsBolt
withFileNameFormat(FileNameFormat fileNameFormat)
HdfsBolt
withFsUrl(String fsUrl)
HdfsBolt
withMaxOpenFiles(int maxOpenFiles)
HdfsBolt
withPartitioner(Partitioner partitioner)
HdfsBolt
withRecordFormat(RecordFormat format)
HdfsBolt
withRetryCount(int fileRetryCount)
HdfsBolt
withRotationPolicy(FileRotationPolicy rotationPolicy)
HdfsBolt
withSyncPolicy(SyncPolicy syncPolicy)
HdfsBolt
withTickTupleIntervalSeconds(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:
doPrepare
in classAbstractHdfsBolt
- Throws:
IOException
-
getWriterKey
protected String getWriterKey(Tuple tuple)
- Specified by:
getWriterKey
in classAbstractHdfsBolt
-
makeNewWriter
protected AbstractHDFSWriter makeNewWriter(org.apache.hadoop.fs.Path path, Tuple tuple) throws IOException
- Specified by:
makeNewWriter
in classAbstractHdfsBolt
- Throws:
IOException
-
-