T
- type of record to write.public interface FileStoreWrite<T>
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the writer.
|
void |
compact(org.apache.flink.table.data.binary.BinaryRowData partition,
int bucket,
boolean fullCompaction)
Compact data stored in given partition and bucket.
|
void |
notifyNewFiles(long snapshotId,
org.apache.flink.table.data.binary.BinaryRowData partition,
int bucket,
List<DataFileMeta> files)
Notify that some new files are created at given snapshot in given bucket.
|
List<FileCommittable> |
prepareCommit(boolean blocking,
long commitIdentifier)
Prepare commit in the write.
|
FileStoreWrite<T> |
withIOManager(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager) |
void |
withOverwrite(boolean overwrite)
If overwrite is true, the writer will overwrite the store, otherwise it won't.
|
void |
write(org.apache.flink.table.data.binary.BinaryRowData partition,
int bucket,
T data)
Write the data to the store according to the partition and bucket.
|
FileStoreWrite<T> withIOManager(org.apache.flink.runtime.io.disk.iomanager.IOManager ioManager)
void withOverwrite(boolean overwrite)
overwrite
- the overwrite flagvoid write(org.apache.flink.table.data.binary.BinaryRowData partition, int bucket, T data) throws Exception
partition
- the partition of the databucket
- the bucket id of the datadata
- the given dataException
- the thrown exception when writing the recordvoid compact(org.apache.flink.table.data.binary.BinaryRowData partition, int bucket, boolean fullCompaction) throws Exception
partition
- the partition to compactbucket
- the bucket to compactfullCompaction
- whether to trigger full compaction or just normal compactionException
- the thrown exception when compacting the recordsvoid notifyNewFiles(long snapshotId, org.apache.flink.table.data.binary.BinaryRowData partition, int bucket, List<DataFileMeta> files)
Most probably, these files are created by another job. Currently this method is only used by the dedicated compact job to see files created by writer jobs.
snapshotId
- the snapshot id where new files are createdpartition
- the partition where new files are createdbucket
- the bucket where new files are createdfiles
- the new files themselvesList<FileCommittable> prepareCommit(boolean blocking, long commitIdentifier) throws Exception
blocking
- if this method need to wait for current compaction to completecommitIdentifier
- identifier of the commit being preparedException
- the thrown exceptionCopyright © 2019–2023 The Apache Software Foundation. All rights reserved.