org.apache.storm.hdfs.bolt.rotation
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
Method Summary |
boolean |
mark(Tuple tuple,
long offset)
Called for every tuple the HdfsBolt executes. |
void |
reset()
Called after the HdfsBolt rotates a file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NoRotationPolicy
public NoRotationPolicy()
mark
public boolean mark(Tuple tuple,
long offset)
- Description copied from interface:
FileRotationPolicy
- Called for every tuple the HdfsBolt executes.
- Specified by:
mark
in interface FileRotationPolicy
- 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:
FileRotationPolicy
- Called after the HdfsBolt rotates a file.
- Specified by:
reset
in interface FileRotationPolicy
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.