public class HadoopPathBasedPartFileWriter<IN,BucketID> extends AbstractPartFileWriter<IN,BucketID>
Modifier and Type | Class and Description |
---|---|
static class |
HadoopPathBasedPartFileWriter.HadoopPathBasedBucketWriter<IN,BucketID>
Factory to create
HadoopPathBasedPartFileWriter . |
InProgressFileWriter.InProgressFileRecoverable, InProgressFileWriter.PendingFileRecoverable
CompactingFileWriter.Type
Constructor and Description |
---|
HadoopPathBasedPartFileWriter(BucketID bucketID,
HadoopPathBasedBulkWriter<IN> writer,
HadoopFileCommitter fileCommitter,
long createTime) |
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.
|
long |
getSize() |
InProgressFileWriter.InProgressFileRecoverable |
persist() |
void |
write(IN element,
long currentTime)
Write an element to the part file.
|
getBucketId, getCreationTime, getLastUpdateTime, markWrite
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write
public HadoopPathBasedPartFileWriter(BucketID bucketID, HadoopPathBasedBulkWriter<IN> writer, HadoopFileCommitter fileCommitter, long createTime)
public void write(IN element, long currentTime) throws IOException
InProgressFileWriter
element
- the element to be written.currentTime
- the writing time.IOException
- Thrown if writing the element fails.public InProgressFileWriter.InProgressFileRecoverable persist()
public InProgressFileWriter.PendingFileRecoverable closeForCommit() throws IOException
CompactingFileWriter
InProgressFileWriter.PendingFileRecoverable
of the written compacting file.Bucket
uses this to commit the pending
file.IOException
- Thrown if an I/O error occurs.public void dispose()
InProgressFileWriter
public long getSize() throws IOException
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.