@PublicEvolving public interface RollingPolicy<IN,BucketID> extends Serializable
Bucket in the StreamingFileSink rolls its currently
open part file and opens a new one.| 限定符和类型 | 方法和说明 |
|---|---|
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. its size.
|
boolean |
shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState,
long currentTime)
Determines if the in-progress part file for a bucket should roll based on a time condition.
|
boolean shouldRollOnCheckpoint(PartFileInfo<BucketID> partFileState) throws IOException
partFileState - the state of the currently open part file of the bucket.True if the part file should roll, false otherwise.IOExceptionboolean shouldRollOnEvent(PartFileInfo<BucketID> partFileState, IN element) throws IOException
element - the element being processed.partFileState - the state of the currently open part file of the bucket.True if the part file should roll, false otherwise.IOExceptionboolean shouldRollOnProcessingTime(PartFileInfo<BucketID> partFileState, long currentTime) throws IOException
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.