Class NoRotationPolicy
- java.lang.Object
-
- org.apache.storm.hdfs.bolt.rotation.NoRotationPolicy
-
- All Implemented Interfaces:
Serializable,FileRotationPolicy
public class NoRotationPolicy extends Object implements FileRotationPolicy
File rotation policy that will never rotate... Just one big file. Intended for testing purposes.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NoRotationPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileRotationPolicycopy()Must be able to copy the rotation policy.booleanmark(Tuple tuple, long offset)Called for every tuple the HdfsBolt executes.voidreset()Called after the HdfsBolt rotates a file.
-
-
-
Method Detail
-
mark
public boolean mark(Tuple tuple, long offset)
Description copied from interface:FileRotationPolicyCalled for every tuple the HdfsBolt executes.- Specified by:
markin interfaceFileRotationPolicy- Parameters:
tuple- The tuple executed.offset- current offset of file being written- Returns:
- true if a file rotation should be performed
-
reset
public void reset()
Description copied from interface:FileRotationPolicyCalled after the HdfsBolt rotates a file.- Specified by:
resetin interfaceFileRotationPolicy
-
copy
public FileRotationPolicy copy()
Description copied from interface:FileRotationPolicyMust be able to copy the rotation policy.- Specified by:
copyin interfaceFileRotationPolicy
-
-