public final class HiveIcebergOutputCommitter
extends org.apache.hadoop.mapred.OutputCommitter
Constructor and Description |
---|
HiveIcebergOutputCommitter() |
Modifier and Type | Method and Description |
---|---|
void |
abortJob(org.apache.hadoop.mapred.JobContext jobContext,
int status)
Removes the generated data files, if there is a commit file already generated for them.
|
void |
abortTask(org.apache.hadoop.mapred.TaskAttemptContext context)
Removes files generated by this task.
|
void |
commitJob(org.apache.hadoop.mapred.JobContext jobContext)
Reads the commit files stored in the temp directory and collects the generated committed data files.
|
void |
commitTask(org.apache.hadoop.mapred.TaskAttemptContext context)
Collects the generated data files and creates a commit file storing the data file list.
|
boolean |
needsTaskCommit(org.apache.hadoop.mapred.TaskAttemptContext context) |
void |
setupJob(org.apache.hadoop.mapred.JobContext jobContext) |
void |
setupTask(org.apache.hadoop.mapred.TaskAttemptContext taskAttemptContext) |
abortJob, abortTask, cleanupJob, cleanupJob, commitJob, commitTask, isCommitJobRepeatable, isCommitJobRepeatable, isRecoverySupported, isRecoverySupported, isRecoverySupported, needsTaskCommit, recoverTask, recoverTask, setupJob, setupTask
public void setupJob(org.apache.hadoop.mapred.JobContext jobContext)
setupJob
in class org.apache.hadoop.mapred.OutputCommitter
public void setupTask(org.apache.hadoop.mapred.TaskAttemptContext taskAttemptContext)
setupTask
in class org.apache.hadoop.mapred.OutputCommitter
public boolean needsTaskCommit(org.apache.hadoop.mapred.TaskAttemptContext context)
needsTaskCommit
in class org.apache.hadoop.mapred.OutputCommitter
public void commitTask(org.apache.hadoop.mapred.TaskAttemptContext context) throws java.io.IOException
commitTask
in class org.apache.hadoop.mapred.OutputCommitter
context
- The job contextjava.io.IOException
- Thrown if there is an error writing the commit filepublic void abortTask(org.apache.hadoop.mapred.TaskAttemptContext context) throws java.io.IOException
abortTask
in class org.apache.hadoop.mapred.OutputCommitter
context
- The task contextjava.io.IOException
- Thrown if there is an error closing the writerpublic void commitJob(org.apache.hadoop.mapred.JobContext jobContext) throws java.io.IOException
commitJob
in class org.apache.hadoop.mapred.OutputCommitter
jobContext
- The job contextjava.io.IOException
- if there is a failure deleting the filespublic void abortJob(org.apache.hadoop.mapred.JobContext jobContext, int status) throws java.io.IOException
abortJob
in class org.apache.hadoop.mapred.OutputCommitter
jobContext
- The job contextstatus
- The status of the jobjava.io.IOException
- if there is a failure deleting the files