@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)
RollingPolicy
shouldRollOnCheckpoint
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
RollingPolicy
shouldRollOnEvent
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.IOException
public abstract boolean shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime) throws IOException
RollingPolicy
shouldRollOnProcessingTime
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.IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.