public class NoRotationPolicy extends Object implements FileRotationPolicy
File rotation policy that will never rotate… Just one big file. Intended for testing purposes.
| Constructor and Description |
|---|
NoRotationPolicy() |
| 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.
|
public boolean mark(TridentTuple tuple, long offset)
FileRotationPolicyCalled for every tuple the HdfsBolt executes.
mark in interface FileRotationPolicytuple - The tuple executed.offset - current offset of file being writtenpublic boolean mark(long offset)
FileRotationPolicyCheck if a file rotation should be performed based on the offset at which file is being written.
mark in interface FileRotationPolicyoffset - the current offset of file being writtenpublic void reset()
FileRotationPolicyCalled after the HdfsBolt rotates a file.
reset in interface FileRotationPolicypublic void start()
FileRotationPolicyStart the policy. Useful in case of policies like timed rotation where the timer can be started.
start in interface FileRotationPolicyCopyright © 2021 The Apache Software Foundation. All rights reserved.