T
- type of record to write.public abstract class MemoryFileStoreWrite<T> extends AbstractFileStoreWrite<T>
FileStoreWrite
implementation which supports using shared memory and preempting
memory from other writers.AbstractFileStoreWrite.WriterContainer<T>
FileStoreWrite.State<T>
Modifier and Type | Field and Description |
---|---|
protected CacheManager |
cacheManager |
protected CoreOptions |
options |
compactionMetrics, ioManager, isStreamingMode, snapshotManager, tableName, writers
Constructor and Description |
---|
MemoryFileStoreWrite(String commitUser,
SnapshotManager snapshotManager,
FileStoreScan scan,
CoreOptions options,
IndexMaintainer.Factory<T> indexFactory,
DeletionVectorsMaintainer.Factory dvMaintainerFactory,
String tableName) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the writer.
|
protected void |
notifyNewWriter(RecordWriter<T> writer) |
List<CommitMessage> |
prepareCommit(boolean waitCompaction,
long commitIdentifier)
Prepare commit in the write.
|
FileStoreWrite<T> |
withMemoryPoolFactory(MemoryPoolFactory memoryPoolFactory)
With memory pool factory for the current file store write.
|
FileStoreWrite<T> |
withMetricRegistry(MetricRegistry metricRegistry)
With metrics to measure compaction.
|
checkpoint, compact, createWriter, createWriterContainer, forceBufferSpill, getActiveBuckets, getCompactExecutor, getWriterWrapper, notifyNewFiles, restore, withCompactExecutor, withExecutionMode, withIgnorePreviousFiles, withInsertOnly, withIOManager, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
withMemoryPool
protected final CoreOptions options
protected final CacheManager cacheManager
public MemoryFileStoreWrite(String commitUser, SnapshotManager snapshotManager, FileStoreScan scan, CoreOptions options, @Nullable IndexMaintainer.Factory<T> indexFactory, @Nullable DeletionVectorsMaintainer.Factory dvMaintainerFactory, String tableName)
public FileStoreWrite<T> withMemoryPoolFactory(MemoryPoolFactory memoryPoolFactory)
FileStoreWrite
withMemoryPoolFactory
in interface FileStoreWrite<T>
withMemoryPoolFactory
in class AbstractFileStoreWrite<T>
memoryPoolFactory
- the given memory pool factory.protected void notifyNewWriter(RecordWriter<T> writer)
notifyNewWriter
in class AbstractFileStoreWrite<T>
public FileStoreWrite<T> withMetricRegistry(MetricRegistry metricRegistry)
FileStoreWrite
withMetricRegistry
in interface FileStoreWrite<T>
withMetricRegistry
in class AbstractFileStoreWrite<T>
public List<CommitMessage> prepareCommit(boolean waitCompaction, long commitIdentifier) throws Exception
FileStoreWrite
prepareCommit
in interface FileStoreWrite<T>
prepareCommit
in class AbstractFileStoreWrite<T>
waitCompaction
- if this method need to wait for current compaction to completecommitIdentifier
- identifier of the commit being preparedException
- the thrown exceptionpublic void close() throws Exception
FileStoreWrite
close
in interface FileStoreWrite<T>
close
in class AbstractFileStoreWrite<T>
Exception
- the thrown exceptionCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.