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
Constructor and Description |
---|
HadoopPathBasedPartFileWriter(BucketID bucketID,
HadoopPathBasedBulkWriter<IN> writer,
HadoopFileCommitter fileCommitter,
long createTime) |
Modifier and Type | Method and Description |
---|---|
InProgressFileWriter.PendingFileRecoverable |
closeForCommit() |
void |
dispose()
Dispose the part file.
|
long |
getSize() |
InProgressFileWriter.InProgressFileRecoverable |
persist() |
void |
write(IN element,
long currentTime)
Write a element to the part file.
|
getBucketId, getCreationTime, getLastUpdateTime, markWrite
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
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–2021 The Apache Software Foundation. All rights reserved.