@PublicEvolving public abstract class CheckpointRollingPolicy<IN,BucketID> extends Object implements RollingPolicy<IN,BucketID>
RollingPolicy which rolls on every checkpoint.| 限定符和类型 | 类和说明 |
|---|---|
static class |
CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T extends CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T>>
The base abstract builder class for
CheckpointRollingPolicy. |
| 构造器和说明 |
|---|
CheckpointRollingPolicy() |
| 限定符和类型 | 方法和说明 |
|---|---|
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. its size.
|
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 在接口中 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 在接口中 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 在接口中 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–2021 The Apache Software Foundation. All rights reserved.