public static class FileSystemTableSink.TableRollingPolicy extends CheckpointRollingPolicy<RowData,String>
RollingPolicy
, it extends CheckpointRollingPolicy
for bulk writers.CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T extends CheckpointRollingPolicy.PolicyBuilder<IN,BucketID,T>>
Constructor and Description |
---|
TableRollingPolicy(boolean rollOnCheckpoint,
long rollingFileSize,
long rollingTimeInterval,
long inactivityInterval) |
Modifier and Type | Method and Description |
---|---|
boolean |
shouldRollOnCheckpoint(PartFileInfo<String> partFileState)
Determines if the in-progress part file for a bucket should roll on every checkpoint.
|
boolean |
shouldRollOnEvent(PartFileInfo<String> partFileState,
RowData element)
Determines if the in-progress part file for a bucket should roll based on its current state,
e.g.
|
boolean |
shouldRollOnProcessingTime(PartFileInfo<String> partFileState,
long currentTime)
Determines if the in-progress part file for a bucket should roll based on a time condition.
|
public TableRollingPolicy(boolean rollOnCheckpoint, long rollingFileSize, long rollingTimeInterval, long inactivityInterval)
public boolean shouldRollOnCheckpoint(PartFileInfo<String> partFileState)
RollingPolicy
shouldRollOnCheckpoint
in interface RollingPolicy<RowData,String>
shouldRollOnCheckpoint
in class CheckpointRollingPolicy<RowData,String>
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<String> partFileState, RowData element) throws IOException
RollingPolicy
shouldRollOnEvent
in interface RollingPolicy<RowData,String>
shouldRollOnEvent
in class CheckpointRollingPolicy<RowData,String>
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 boolean shouldRollOnProcessingTime(PartFileInfo<String> partFileState, long currentTime)
RollingPolicy
shouldRollOnProcessingTime
in interface RollingPolicy<RowData,String>
shouldRollOnProcessingTime
in class CheckpointRollingPolicy<RowData,String>
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.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.