@Internal public interface InProgressFileWriter<IN,BucketID> extends PartFileInfo<BucketID>, RecordWiseCompactingFileWriter<IN>
Bucket uses the InProgressFileWriter to write element to a part file.| Modifier and Type | Interface and Description |
|---|---|
static interface |
InProgressFileWriter.InProgressFileRecoverable
A handle can be used to recover in-progress file..
|
static interface |
InProgressFileWriter.PendingFileRecoverable
The handle can be used to recover pending file.
|
CompactingFileWriter.Type| Modifier and Type | Method and Description |
|---|---|
InProgressFileWriter.PendingFileRecoverable |
closeForCommit()
Closes the writer and gets the
InProgressFileWriter.PendingFileRecoverable of the written compacting file. |
void |
dispose()
Dispose the part file.
|
InProgressFileWriter.InProgressFileRecoverable |
persist() |
default void |
write(IN element)
Write an element to the compacting file.
|
void |
write(IN element,
long currentTime)
Write an element to the part file.
|
getBucketId, getCreationTime, getLastUpdateTime, getSizevoid write(IN element, long currentTime) throws IOException
element - the element to be written.currentTime - the writing time.IOException - Thrown if writing the element fails.InProgressFileWriter.InProgressFileRecoverable persist() throws IOException
IOException - Thrown if persisting the part file fails.InProgressFileWriter.PendingFileRecoverable closeForCommit() throws IOException
CompactingFileWriterInProgressFileWriter.PendingFileRecoverable of the written compacting file.closeForCommit in interface CompactingFileWriterBucket uses this to commit the pending
file.IOException - Thrown if an I/O error occurs.void dispose()
default void write(IN element) throws IOException
RecordWiseCompactingFileWriterwrite in interface RecordWiseCompactingFileWriter<IN>element - the element to be written.IOException - Thrown if writing the element fails.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.