@Internal public class FileCommitter extends Object implements Committer<FileSinkCommittable>
FileSink
.
This committer is responsible for taking staged part-files, i.e. part-files in "pending"
state, created by the FileWriter
and commit them, or put them in "finished" state and ready to be consumed by downstream
applications or systems.
Committer.CommitRequest<CommT>
Constructor and Description |
---|
FileCommitter(BucketWriter<?,?> bucketWriter) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
commit(Collection<Committer.CommitRequest<FileSinkCommittable>> requests)
Commit the given list of
CommT . |
public FileCommitter(BucketWriter<?,?> bucketWriter)
public void commit(Collection<Committer.CommitRequest<FileSinkCommittable>> requests) throws IOException, InterruptedException
Committer
CommT
.commit
in interface Committer<FileSinkCommittable>
requests
- A list of commit requests staged by the sink writer.IOException
- for reasons that may yield a complete restart of the job.InterruptedException
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.