Class TimedRotationPolicy
java.lang.Object
org.apache.storm.hdfs.bolt.rotation.TimedRotationPolicy
- All Implemented Interfaces:
Serializable
,FileRotationPolicy
- See Also:
-
Nested Class Summary
-
Constructor Summary
ModifierConstructorDescriptionTimedRotationPolicy
(float count, TimedRotationPolicy.TimeUnit units) protected
TimedRotationPolicy
(long interval) -
Method Summary
-
Constructor Details
-
TimedRotationPolicy
-
TimedRotationPolicy
protected TimedRotationPolicy(long interval)
-
-
Method Details
-
mark
Called for every tuple the HdfsBolt executes.- Specified by:
mark
in 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()Called after the HdfsBolt rotates a file.- Specified by:
reset
in interfaceFileRotationPolicy
-
copy
Description copied from interface:FileRotationPolicy
Must be able to copy the rotation policy.- Specified by:
copy
in interfaceFileRotationPolicy
-
getInterval
public long getInterval()
-