@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.
Constructor and Description |
---|
FileCommitter(BucketWriter<?,?> bucketWriter) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
List<FileSinkCommittable> |
commit(List<FileSinkCommittable> committables)
Commit the given list of
CommT . |
public FileCommitter(BucketWriter<?,?> bucketWriter)
public List<FileSinkCommittable> commit(List<FileSinkCommittable> committables) throws IOException
Committer
CommT
.commit
in interface Committer<FileSinkCommittable>
committables
- A list of information needed to commit data staged by the sink.CommT
needed to re-commit, which is needed in case we implement a
"commit-with-retry" pattern.IOException
- if the commit operation fail and do not want to retry any more.public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.