Class TimedRotationPolicy
java.lang.Object
org.apache.storm.hdfs.trident.rotation.TimedRotationPolicy
- All Implemented Interfaces:
- Serializable,- FileRotationPolicy
- See Also:
- 
Nested Class SummaryNested Classes
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlongbooleanmark(long offset) Check if a file rotation should be performed based on the offset at which file is being written.booleanmark(TridentTuple tuple, long offset) Called for every tuple the HdfsBolt executes.voidreset()Called after the HdfsBolt rotates a file.voidstart()Start the timer to run at fixed intervals.
- 
Constructor Details- 
TimedRotationPolicy
 
- 
- 
Method Details- 
markCalled for every tuple the HdfsBolt executes.- Specified by:
- markin interface- FileRotationPolicy
- Parameters:
- tuple- The tuple executed.
- offset- current offset of file being written
- Returns:
- true if a file rotation should be performed
 
- 
markpublic boolean mark(long offset) Description copied from interface:FileRotationPolicyCheck if a file rotation should be performed based on the offset at which file is being written.- Specified by:
- markin interface- FileRotationPolicy
- Parameters:
- offset- the current offset of file being written
- Returns:
- true if a file rotation should be performed.
 
- 
resetpublic void reset()Called after the HdfsBolt rotates a file.- Specified by:
- resetin interface- FileRotationPolicy
 
- 
getIntervalpublic long getInterval()
- 
startpublic void start()Start the timer to run at fixed intervals.- Specified by:
- startin interface- FileRotationPolicy
 
 
-