public class TimedRotationPolicy extends Object implements FileRotationPolicy
Modifier and Type | Class and Description |
---|---|
static class |
TimedRotationPolicy.TimeUnit |
Modifier | Constructor and Description |
---|---|
|
TimedRotationPolicy(float count,
TimedRotationPolicy.TimeUnit units) |
protected |
TimedRotationPolicy(long interval) |
Modifier and Type | Method and Description |
---|---|
FileRotationPolicy |
copy()
Must be able to copy the rotation policy.
|
long |
getInterval() |
boolean |
mark(Tuple tuple,
long offset)
Called for every tuple the HdfsBolt executes.
|
void |
reset()
Called after the HdfsBolt rotates a file.
|
public TimedRotationPolicy(float count, TimedRotationPolicy.TimeUnit units)
protected TimedRotationPolicy(long interval)
public boolean mark(Tuple tuple, long offset)
Called for every tuple the HdfsBolt executes.
mark
in interface FileRotationPolicy
tuple
- The tuple executed.offset
- current offset of file being writtenpublic void reset()
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
public long getInterval()
Copyright © 2022 The Apache Software Foundation. All rights reserved.