public abstract class AbstractHdfsBolt extends BaseRichBolt
Modifier and Type | Field and Description |
---|---|
protected OutputCollector |
collector |
protected String |
configKey |
protected FileNameFormat |
fileNameFormat |
protected org.apache.hadoop.fs.FileSystem |
fs |
protected String |
fsUrl |
protected org.apache.hadoop.conf.Configuration |
hdfsConfig |
protected int |
rotation |
protected ArrayList<RotationAction> |
rotationActions |
protected FileRotationPolicy |
rotationPolicy |
protected Timer |
rotationTimer |
protected SyncPolicy |
syncPolicy |
protected Object |
writeLock |
Constructor and Description |
---|
AbstractHdfsBolt() |
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer)
Declare the output schema for all the streams of this topology.
|
void |
prepare(Map conf,
TopologyContext topologyContext,
OutputCollector collector)
Marked as final to prevent override.
|
protected void |
rotateOutputFile() |
cleanup
getComponentConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentConfiguration
protected ArrayList<RotationAction> rotationActions
protected OutputCollector collector
protected transient org.apache.hadoop.fs.FileSystem fs
protected SyncPolicy syncPolicy
protected FileRotationPolicy rotationPolicy
protected FileNameFormat fileNameFormat
protected int rotation
protected String fsUrl
protected String configKey
protected transient Object writeLock
protected transient Timer rotationTimer
protected transient org.apache.hadoop.conf.Configuration hdfsConfig
protected void rotateOutputFile() throws IOException
IOException
public final void prepare(Map conf, TopologyContext topologyContext, OutputCollector collector)
conf
- topologyContext
- collector
- public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer)
IComponent
outputFieldsDeclarer
- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct streamCopyright © 2016 The Apache Software Foundation. All Rights Reserved.