public class AppendOnlyFileStoreWrite extends MemoryFileStoreWrite<InternalRow> implements BundleFileStoreWriter
AbstractFileStoreWrite.WriterContainer<T>
FileStoreWrite.State<T>
cacheManager, options
compactionMetrics, ioManager, isStreamingMode, snapshotManager, tableName, writers
Constructor and Description |
---|
AppendOnlyFileStoreWrite(FileIO fileIO,
RawFileSplitRead read,
long schemaId,
String commitUser,
RowType rowType,
FileStorePathFactory pathFactory,
SnapshotManager snapshotManager,
FileStoreScan scan,
CoreOptions options,
BucketMode bucketMode,
DeletionVectorsMaintainer.Factory dvMaintainerFactory,
String tableName) |
Modifier and Type | Method and Description |
---|---|
List<DataFileMeta> |
compactRewrite(BinaryRow partition,
int bucket,
java.util.function.Function<String,DeletionVector> dvFactory,
List<DataFileMeta> toCompact) |
protected RecordWriter<InternalRow> |
createWriter(Long snapshotId,
BinaryRow partition,
int bucket,
List<DataFileMeta> restoredFiles,
long restoredMaxSeqNumber,
CommitIncrement restoreIncrement,
ExecutorService compactExecutor,
DeletionVectorsMaintainer dvMaintainer) |
protected void |
forceBufferSpill() |
void |
withIgnorePreviousFiles(boolean ignorePrevious)
Set whether the write operation should ignore previously stored files.
|
void |
writeBundle(BinaryRow partition,
int bucket,
BundleRecords bundle)
Write the batch data to the store according to the partition and bucket.
|
close, notifyNewWriter, prepareCommit, withMemoryPoolFactory, withMetricRegistry
checkpoint, compact, createWriterContainer, getActiveBuckets, getCompactExecutor, getWriterWrapper, notifyNewFiles, restore, withCompactExecutor, withExecutionMode, withInsertOnly, withIOManager, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, compact, notifyNewFiles, prepareCommit, withCompactExecutor, withExecutionMode, withInsertOnly, withIOManager, withMemoryPool, withMemoryPoolFactory, withMetricRegistry, write
checkpoint, restore
public AppendOnlyFileStoreWrite(FileIO fileIO, RawFileSplitRead read, long schemaId, String commitUser, RowType rowType, FileStorePathFactory pathFactory, SnapshotManager snapshotManager, FileStoreScan scan, CoreOptions options, BucketMode bucketMode, @Nullable DeletionVectorsMaintainer.Factory dvMaintainerFactory, String tableName)
protected RecordWriter<InternalRow> createWriter(@Nullable Long snapshotId, BinaryRow partition, int bucket, List<DataFileMeta> restoredFiles, long restoredMaxSeqNumber, @Nullable CommitIncrement restoreIncrement, ExecutorService compactExecutor, @Nullable DeletionVectorsMaintainer dvMaintainer)
createWriter
in class AbstractFileStoreWrite<InternalRow>
public List<DataFileMeta> compactRewrite(BinaryRow partition, int bucket, @Nullable java.util.function.Function<String,DeletionVector> dvFactory, List<DataFileMeta> toCompact) throws Exception
Exception
public void withIgnorePreviousFiles(boolean ignorePrevious)
FileStoreWrite
withIgnorePreviousFiles
in interface FileStoreWrite<InternalRow>
withIgnorePreviousFiles
in class AbstractFileStoreWrite<InternalRow>
ignorePrevious
- whether the write operation should ignore previously stored files.protected void forceBufferSpill() throws Exception
forceBufferSpill
in class AbstractFileStoreWrite<InternalRow>
Exception
public void writeBundle(BinaryRow partition, int bucket, BundleRecords bundle) throws Exception
BundleFileStoreWriter
writeBundle
in interface BundleFileStoreWriter
partition
- the partition of the databucket
- the bucket id of the databundle
- the given dataException
- the thrown exception when writing the recordCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.