public interface FileRotationPolicy extends Serializable
The HdfsBolt will call the mark()
method for every
tuple received. If the mark()
method returns
true
the HdfsBolt will perform a file rotation.
After file rotation, the HdfsBolt will call the reset()
method.
Modifier and Type | Method and Description |
---|---|
boolean |
mark(long offset)
Check if a file rotation should be performed based on
the offset at which file is being written.
|
boolean |
mark(TridentTuple tuple,
long offset)
Called for every tuple the HdfsBolt executes.
|
void |
reset()
Called after the HdfsBolt rotates a file.
|
void |
start()
Start the policy.
|
boolean mark(TridentTuple tuple, long offset)
tuple
- The tuple executed.offset
- current offset of file being writtenboolean mark(long offset)
offset
- the current offset of file being writtenvoid reset()
void start()
Copyright © 2023 The Apache Software Foundation. All rights reserved.