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 FileRotationPolicytuple - The tuple executed.offset - current offset of file being writtenpublic void reset()
Called after the HdfsBolt rotates a file.
reset in interface FileRotationPolicypublic FileRotationPolicy copy()
FileRotationPolicyMust be able to copy the rotation policy.
copy in interface FileRotationPolicypublic long getInterval()
Copyright © 2022 The Apache Software Foundation. All rights reserved.