Package org.apache.storm.hdfs.trident
Class HdfsState.HdfsFileOptions
- java.lang.Object
-
- org.apache.storm.hdfs.trident.HdfsState.Options
-
- org.apache.storm.hdfs.trident.HdfsState.HdfsFileOptions
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- HdfsState
public static class HdfsState.HdfsFileOptions extends HdfsState.Options
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RecordFormatformat-
Fields inherited from class org.apache.storm.hdfs.trident.HdfsState.Options
configKey, fileNameFormat, fs, fsUrl, hdfsConfig, rotation, rotationActions, rotationPolicy
-
-
Constructor Summary
Constructors Constructor Description HdfsFileOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description HdfsState.HdfsFileOptionsaddRotationAction(RotationAction action)Deprecated.voiddoCommit(Long txId)voidexecute(List<TridentTuple> tuples)longgetCurrentOffset()HdfsState.HdfsFileOptionswithBufferSize(int sizeInBytes)Set the size of the buffer used for hdfs file copy in case of recovery.HdfsState.HdfsFileOptionswithConfigKey(String configKey)HdfsState.HdfsFileOptionswithFileNameFormat(FileNameFormat fileNameFormat)HdfsState.HdfsFileOptionswithFsUrl(String fsUrl)HdfsState.HdfsFileOptionswithRecordFormat(RecordFormat format)HdfsState.HdfsFileOptionswithRotationPolicy(FileRotationPolicy rotationPolicy)-
Methods inherited from class org.apache.storm.hdfs.trident.HdfsState.Options
rotateOutputFile, rotateOutputFile
-
-
-
-
Field Detail
-
format
protected RecordFormat format
-
-
Method Detail
-
withFsUrl
public HdfsState.HdfsFileOptions withFsUrl(String fsUrl)
-
withConfigKey
public HdfsState.HdfsFileOptions withConfigKey(String configKey)
-
withFileNameFormat
public HdfsState.HdfsFileOptions withFileNameFormat(FileNameFormat fileNameFormat)
-
withRecordFormat
public HdfsState.HdfsFileOptions withRecordFormat(RecordFormat format)
-
withRotationPolicy
public HdfsState.HdfsFileOptions withRotationPolicy(FileRotationPolicy rotationPolicy)
-
withBufferSize
public HdfsState.HdfsFileOptions withBufferSize(int sizeInBytes)
Set the size of the buffer used for hdfs file copy in case of recovery. The default value is 131072.
Note: The lower limit for the parameter is 4096, below which the option is ignored.
- Parameters:
sizeInBytes- the buffer size in bytes- Returns:
HdfsState.HdfsFileOptions
-
addRotationAction
@Deprecated public HdfsState.HdfsFileOptions addRotationAction(RotationAction action)
Deprecated.
-
getCurrentOffset
public long getCurrentOffset()
-
doCommit
public void doCommit(Long txId) throws IOException
- Throws:
IOException
-
execute
public void execute(List<TridentTuple> tuples) throws IOException
- Throws:
IOException
-
-