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 |
---|---|
FileRotationPolicy |
copy()
Must be able to copy the rotation policy.
|
boolean |
mark(Tuple tuple,
long offset)
Called for every tuple the HdfsBolt executes.
|
void |
reset()
Called after the HdfsBolt rotates a file.
|
public boolean mark(Tuple tuple, long offset)
FileRotationPolicy
Called for every tuple the HdfsBolt executes.
mark
in interface FileRotationPolicy
tuple
- The tuple executed.offset
- current offset of file being writtenpublic void reset()
FileRotationPolicy
Called after the HdfsBolt rotates a file.
reset
in interface FileRotationPolicy
public FileRotationPolicy copy()
FileRotationPolicy
Must be able to copy the rotation policy.
copy
in interface FileRotationPolicy
Copyright © 2020 The Apache Software Foundation. All rights reserved.