public class HdfsBolt extends AbstractHdfsBolt
collector, configKey, fileNameFormat, fs, fsUrl, hdfsConfig, rotation, rotationActions, rotationPolicy, rotationTimer, syncPolicy, writeLock
Constructor and Description |
---|
HdfsBolt() |
Modifier and Type | Method and Description |
---|---|
HdfsBolt |
addRotationAction(RotationAction action) |
void |
doPrepare(Map conf,
TopologyContext topologyContext,
OutputCollector collector) |
void |
execute(Tuple tuple)
Process a single tuple of input.
|
HdfsBolt |
withConfigKey(String configKey) |
HdfsBolt |
withFileNameFormat(FileNameFormat fileNameFormat) |
HdfsBolt |
withFsUrl(String fsUrl) |
HdfsBolt |
withRecordFormat(RecordFormat format) |
HdfsBolt |
withRotationPolicy(FileRotationPolicy rotationPolicy) |
HdfsBolt |
withSyncPolicy(SyncPolicy syncPolicy) |
declareOutputFields, prepare, rotateOutputFile
cleanup
getComponentConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentConfiguration
public HdfsBolt withFileNameFormat(FileNameFormat fileNameFormat)
public HdfsBolt withRecordFormat(RecordFormat format)
public HdfsBolt withSyncPolicy(SyncPolicy syncPolicy)
public HdfsBolt withRotationPolicy(FileRotationPolicy rotationPolicy)
public HdfsBolt addRotationAction(RotationAction action)
public void doPrepare(Map conf, TopologyContext topologyContext, OutputCollector collector) throws IOException
IOException
public void execute(Tuple tuple)
IBolt
Tuples should be emitted using the OutputCollector provided through the prepare method. It is required that all input tuples are acked or failed at some point using the OutputCollector. Otherwise, Storm will be unable to determine when tuples coming off the spouts have been completed.
For the common case of acking an input tuple at the end of the execute method, see IBasicBolt which automates this.
tuple
- The input tuple to be processed.Copyright © 2016 The Apache Software Foundation. All Rights Reserved.