@Internal public interface InProgressFileWriter<IN,BucketID> extends PartFileInfo<BucketID>
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.
|
| Modifier and Type | Method and Description |
|---|---|
InProgressFileWriter.PendingFileRecoverable |
closeForCommit() |
void |
dispose()
Dispose the part file.
|
InProgressFileWriter.InProgressFileRecoverable |
persist() |
void |
write(IN element,
long currentTime)
Write a 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
Bucket uses this to commit the pending
file.IOException - Thrown if an I/O error occurs.void dispose()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.