public abstract class BaseRewriteDataFilesAction<ThisT>
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
BaseRewriteDataFilesAction(Table table) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
caseSensitive() |
BaseRewriteDataFilesAction<ThisT> |
caseSensitive(boolean newCaseSensitive)
Is it case sensitive
|
protected void |
commit(SnapshotUpdate<?> update) |
protected EncryptionManager |
encryptionManager() |
RewriteDataFilesActionResult |
execute()
Executes this action.
|
protected abstract FileIO |
fileIO() |
BaseRewriteDataFilesAction<ThisT> |
filter(Expression expr)
Pass a row Expression to filter DataFiles to be rewritten.
|
protected java.lang.String |
metadataTableName(MetadataTableType type) |
protected java.lang.String |
metadataTableName(java.lang.String tableName,
MetadataTableType type) |
BaseRewriteDataFilesAction<ThisT> |
outputSpecId(int specId)
Pass a PartitionSpec id to specify which PartitionSpec should be used in DataFile rewrite
|
protected abstract java.util.List<DataFile> |
rewriteDataForTasks(java.util.List<CombinedScanTask> combinedScanTask) |
protected abstract ThisT |
self() |
ThisT |
set(java.lang.String property,
java.lang.String value) |
protected PartitionSpec |
spec() |
BaseRewriteDataFilesAction<ThisT> |
splitLookback(int lookback)
Specify the number of "bins" considered when trying to pack the next file split into a task.
|
BaseRewriteDataFilesAction<ThisT> |
splitOpenFileCost(long openFileCost)
Specify the minimum file size to count to pack into one "bin".
|
protected Table |
table() |
BaseRewriteDataFilesAction<ThisT> |
targetSizeInBytes(long targetSize)
Specify the target rewrite data file size in bytes
|
BaseRewriteDataFilesAction<ThisT> |
useStartingSequenceNumber(boolean useStarting)
If the compaction should use the sequence number of the snapshot at compaction start time for
new data files, instead of using the sequence number of the newly produced snapshot.
|
protected BaseRewriteDataFilesAction(Table table)
protected Table table()
protected PartitionSpec spec()
protected EncryptionManager encryptionManager()
protected boolean caseSensitive()
public BaseRewriteDataFilesAction<ThisT> caseSensitive(boolean newCaseSensitive)
newCaseSensitive
- caseSensitivepublic BaseRewriteDataFilesAction<ThisT> outputSpecId(int specId)
specId
- PartitionSpec id to rewritepublic BaseRewriteDataFilesAction<ThisT> targetSizeInBytes(long targetSize)
targetSize
- size in bytes of rewrite data filepublic BaseRewriteDataFilesAction<ThisT> splitLookback(int lookback)
This configuration can reorder the incoming file regions, to preserve order for lower/upper bounds in file metadata, user can use a lookback of 1.
lookback
- number of "bins" considered when trying to pack the next file split into a
task.public BaseRewriteDataFilesAction<ThisT> splitOpenFileCost(long openFileCost)
this configuration controls the number of files to compact for each task, small value would lead to a high compaction, the default value is 4MB.
openFileCost
- minimum file size to count to pack into one "bin".public BaseRewriteDataFilesAction<ThisT> filter(Expression expr)
expr
- Expression to filter out DataFilespublic BaseRewriteDataFilesAction<ThisT> useStartingSequenceNumber(boolean useStarting)
This avoids commit conflicts with updates that add newer equality deletes at a higher sequence number.
useStarting
- use starting sequence number if set to truepublic RewriteDataFilesActionResult execute()
Action
protected abstract FileIO fileIO()
protected abstract java.util.List<DataFile> rewriteDataForTasks(java.util.List<CombinedScanTask> combinedScanTask)
protected abstract ThisT self()
public ThisT set(java.lang.String property, java.lang.String value)
set
in interface SnapshotUpdateAction<ThisT,R>
protected void commit(SnapshotUpdate<?> update)
protected java.lang.String metadataTableName(MetadataTableType type)
protected java.lang.String metadataTableName(java.lang.String tableName, MetadataTableType type)