public class AvroGenericRecordBolt extends AbstractHdfsBolt
collector, configKey, fileNameFormat, fileRetryCount, fs, fsUrl, hdfsConfig, offset, rotation, rotationActions, rotationPolicy, rotationTimer, syncPolicy, tickTupleInterval, writeLock| Constructor and Description |
|---|
AvroGenericRecordBolt() |
| Modifier and Type | Method and Description |
|---|---|
AvroGenericRecordBolt |
addRotationAction(RotationAction action) |
protected void |
closeOutputFile() |
protected org.apache.hadoop.fs.Path |
createOutputFile() |
protected void |
doPrepare(Map conf,
TopologyContext topologyContext,
OutputCollector collector) |
protected void |
syncTuples()
Make the best effort to sync written data to the underlying file system.
|
AvroGenericRecordBolt |
withConfigKey(String configKey) |
AvroGenericRecordBolt |
withFileNameFormat(FileNameFormat fileNameFormat) |
AvroGenericRecordBolt |
withFsUrl(String fsUrl) |
AvroGenericRecordBolt |
withRotationPolicy(FileRotationPolicy rotationPolicy) |
AvroGenericRecordBolt |
withSchemaAsString(String schemaAsString) |
AvroGenericRecordBolt |
withSyncPolicy(SyncPolicy syncPolicy) |
AvroGenericRecordBolt |
withTickTupleIntervalSeconds(int interval) |
protected void |
writeTuple(Tuple tuple)
writes a tuple to the underlying filesystem but makes no guarantees about syncing data.
|
cleanup, declareOutputFields, execute, getComponentConfiguration, prepare, rotateOutputFilepublic AvroGenericRecordBolt withSchemaAsString(String schemaAsString)
public AvroGenericRecordBolt withFsUrl(String fsUrl)
public AvroGenericRecordBolt withConfigKey(String configKey)
public AvroGenericRecordBolt withFileNameFormat(FileNameFormat fileNameFormat)
public AvroGenericRecordBolt withSyncPolicy(SyncPolicy syncPolicy)
public AvroGenericRecordBolt withRotationPolicy(FileRotationPolicy rotationPolicy)
public AvroGenericRecordBolt addRotationAction(RotationAction action)
public AvroGenericRecordBolt withTickTupleIntervalSeconds(int interval)
protected void doPrepare(Map conf, TopologyContext topologyContext, OutputCollector collector) throws IOException
doPrepare 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 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 closeOutputFile()
throws IOException
closeOutputFile in class AbstractHdfsBoltIOExceptionprotected org.apache.hadoop.fs.Path createOutputFile()
throws IOException
createOutputFile in class AbstractHdfsBoltIOExceptionCopyright © 2018 The Apache Software Foundation. All Rights Reserved.