@Internal public interface InProgressFileWriter<IN,BucketID> extends PartFileInfo<BucketID>, RecordWiseCompactingFileWriter<IN>
Bucket uses the InProgressFileWriter to write element to a part file.| 限定符和类型 | 接口和说明 |
|---|---|
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| 限定符和类型 | 方法和说明 |
|---|---|
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 在接口中 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 在接口中 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.