IN
- the element typeBucketID
- the bucket typepublic abstract class OutputStreamBasedPartFileWriter<IN,BucketID> extends AbstractPartFileWriter<IN,BucketID> implements OutputStreamBasedCompactingFileWriter
RecoverableFsDataOutputStream
.Modifier and Type | Class and Description |
---|---|
static class |
OutputStreamBasedPartFileWriter.OutputStreamBasedInProgressFileRecoverable
The
InProgressFileRecoverable implementation for OutputStreamBasedBucketWriter . |
static class |
OutputStreamBasedPartFileWriter.OutputStreamBasedInProgressFileRecoverableSerializer
The serializer for
OutputStreamBasedPartFileWriter.OutputStreamBasedInProgressFileRecoverable . |
static class |
OutputStreamBasedPartFileWriter.OutputStreamBasedPendingFileRecoverable
The
PendingFileRecoverable implementation for OutputStreamBasedBucketWriter . |
static class |
OutputStreamBasedPartFileWriter.OutputStreamBasedPendingFileRecoverableSerializer
The serializer for
OutputStreamBasedPartFileWriter.OutputStreamBasedPendingFileRecoverable . |
CompactingFileWriter.Type
InProgressFileWriter.InProgressFileRecoverable, InProgressFileWriter.PendingFileRecoverable
Modifier and Type | Method and Description |
---|---|
OutputStream |
asOutputStream()
Gets the output stream underlying the writer.
|
InProgressFileWriter.PendingFileRecoverable |
closeForCommit()
Closes the writer and gets the
InProgressFileWriter.PendingFileRecoverable of the written compacting file. |
void |
dispose()
Dispose the part file.
|
protected void |
ensureWriteType(CompactingFileWriter.Type type) |
long |
getSize() |
InProgressFileWriter.InProgressFileRecoverable |
persist() |
getBucketId, getCreationTime, getLastUpdateTime, markWrite
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write, write
public InProgressFileWriter.InProgressFileRecoverable persist() throws IOException
persist
in interface InProgressFileWriter<IN,BucketID>
IOException
- Thrown if persisting the part file fails.public InProgressFileWriter.PendingFileRecoverable closeForCommit() throws IOException
CompactingFileWriter
InProgressFileWriter.PendingFileRecoverable
of the written compacting file.closeForCommit
in interface CompactingFileWriter
closeForCommit
in interface InProgressFileWriter<IN,BucketID>
Bucket
uses this to commit the pending
file.IOException
- Thrown if an I/O error occurs.public void dispose()
InProgressFileWriter
dispose
in interface InProgressFileWriter<IN,BucketID>
public long getSize() throws IOException
getSize
in interface PartFileInfo<BucketID>
IOException
public OutputStream asOutputStream() throws IOException
OutputStreamBasedCompactingFileWriter
asOutputStream
in interface OutputStreamBasedCompactingFileWriter
IOException
- Thrown if acquiring the stream fails.protected void ensureWriteType(CompactingFileWriter.Type type)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.