@PublicEvolving public class OnCheckpointRollingPolicy<IN,BucketID> extends Object implements RollingPolicy<IN,BucketID>
RollingPolicy which rolls on every checkpoint.| Modifier and Type | Method and Description |
|---|---|
static <IN,BucketID> |
build() |
boolean |
shouldRollOnCheckpoint(PartFileInfo<BucketID> partFileState)
Determines if the in-progress part file for a bucket should roll on every checkpoint.
|
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.
|
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 boolean shouldRollOnEvent(PartFileInfo<BucketID> partFileState, IN element)
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.public boolean shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime)
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.public static <IN,BucketID> OnCheckpointRollingPolicy<IN,BucketID> build()
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.