public class RewriteDataFilesCommitManager.CommitService
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
TIMEOUT_IN_MS_DEFAULT |
Modifier and Type | Method and Description |
---|---|
protected void |
abortFileGroup(RewriteFileGroup group)
Clean up a specified file set by removing any files created for that operation, should not
throw any exceptions
|
void |
close() |
protected void |
commitOrClean(java.util.Set<RewriteFileGroup> batch)
Perform a commit operation on the table for the set of file groups, should cleanup failed file
groups.
|
void |
offer(T group)
Places a file group in the queue and commits a batch of file groups if
rewritesPerCommit number of file groups are present in the queue. |
java.util.List<T> |
results()
Returns all File groups which have been committed
|
void |
start()
Starts a single threaded executor service for handling file group commits.
|
protected void commitOrClean(java.util.Set<RewriteFileGroup> batch)
batch
- set of file groupsprotected void abortFileGroup(RewriteFileGroup group)
group
- group of files which are not yet committedpublic void start()
public void offer(T group)
rewritesPerCommit
number of file groups are present in the queue.group
- file group to eventually be committedpublic java.util.List<T> results()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable