@PublicEvolving public abstract class CheckpointRollingPolicy<IN,BucketID> extends Object implements RollingPolicy<IN,BucketID>
RollingPolicy which rolls on every checkpoint.| Modifier and Type | Class and Description |
|---|---|
static class |
CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T extends CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T>>
The base abstract builder class for
CheckpointRollingPolicy. |
| Constructor and Description |
|---|
CheckpointRollingPolicy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
shouldRollOnCheckpoint(PartFileInfo<BucketID> partFileState)
Determines if the in-progress part file for a bucket should roll on every checkpoint.
|
abstract boolean |
shouldRollOnEvent(PartFileInfo<BucketID> partFileState,
IN element)
Determines if the in-progress part file for a bucket should roll based on its current state, e.g.
|
abstract boolean |
shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState,
long currentTime)
Determines if the in-progress part file for a bucket should roll based on a time condition.
|
public boolean shouldRollOnCheckpoint(PartFileInfo<BucketID> partFileState)
RollingPolicyshouldRollOnCheckpoint in interface RollingPolicy<IN,BucketID>partFileState - the state of the currently open part file of the bucket.True if the part file should roll, false otherwise.public abstract boolean shouldRollOnEvent(PartFileInfo<BucketID> partFileState, IN element) throws IOException
RollingPolicyshouldRollOnEvent in interface RollingPolicy<IN,BucketID>partFileState - the state of the currently open part file of the bucket.element - the element being processed.True if the part file should roll, false otherwise.IOExceptionpublic abstract boolean shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime) throws IOException
RollingPolicyshouldRollOnProcessingTime in interface RollingPolicy<IN,BucketID>partFileState - the state of the currently open part file of the bucket.currentTime - the current processing time.True if the part file should roll, false otherwise.IOExceptionCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.