@InterfaceStability.Unstable
public class ForwardingBigQueryFileOutputCommitter
extends org.apache.hadoop.mapreduce.OutputCommitter
| Constructor and Description |
|---|
ForwardingBigQueryFileOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context,
org.apache.hadoop.mapreduce.OutputCommitter delegate)
This acts as a wrapper which delegates calls to another OutputCommitter whose responsibility is
to generate files in the defined output path.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abortJob(org.apache.hadoop.mapreduce.JobContext context,
org.apache.hadoop.mapreduce.JobStatus.State state)
Calls the delegate's
OutputCommitter#abortJob(JobContext, State). |
void |
abortTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Calls the delegate's
OutputCommitter.abortTask(TaskAttemptContext). |
protected void |
cleanup(org.apache.hadoop.mapreduce.JobContext context)
Attempts to manually delete data in the output path.
|
void |
commitJob(org.apache.hadoop.mapreduce.JobContext context)
Calls the delegate's
OutputCommitter.commitJob(JobContext). |
void |
commitTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Calls the delegate's
OutputCommitter.commitTask(TaskAttemptContext). |
protected BigQueryHelper |
getBigQueryHelper()
Gets the helper used to interact with BigQuery.
|
protected org.apache.hadoop.mapreduce.OutputCommitter |
getDelegate()
Gets the delegate OutputCommitter being wrapped.
|
protected java.util.List<java.lang.String> |
getOutputFileURIs()
Queries the file system for the URIs of all files in the base output directory that are not
directories and whose name isn't
FileOutputCommitter.SUCCEEDED_FILE_NAME. |
boolean |
needsTaskCommit(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Calls the delegate's
OutputCommitter.needsTaskCommit(TaskAttemptContext). |
void |
setupJob(org.apache.hadoop.mapreduce.JobContext context)
Calls the delegate's
OutputCommitter.setupJob(JobContext). |
void |
setupTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Calls the delegate's
OutputCommitter.setupTask(TaskAttemptContext). |
public ForwardingBigQueryFileOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context,
org.apache.hadoop.mapreduce.OutputCommitter delegate)
throws java.io.IOException
context - the context of the task.delegate - the OutputCommitter that this will delegate functionality to.java.io.IOException - if there's an exception while validating the output path or getting the
BigQueryHelper.public void commitJob(org.apache.hadoop.mapreduce.JobContext context)
throws java.io.IOException
OutputCommitter.commitJob(JobContext).commitJob in class org.apache.hadoop.mapreduce.OutputCommitterjava.io.IOExceptionpublic void abortJob(org.apache.hadoop.mapreduce.JobContext context,
org.apache.hadoop.mapreduce.JobStatus.State state)
throws java.io.IOException
OutputCommitter#abortJob(JobContext, State).abortJob in class org.apache.hadoop.mapreduce.OutputCommitterjava.io.IOExceptionpublic void abortTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException
OutputCommitter.abortTask(TaskAttemptContext).abortTask in class org.apache.hadoop.mapreduce.OutputCommitterjava.io.IOExceptionpublic void commitTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException
OutputCommitter.commitTask(TaskAttemptContext).commitTask in class org.apache.hadoop.mapreduce.OutputCommitterjava.io.IOExceptionpublic boolean needsTaskCommit(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException
OutputCommitter.needsTaskCommit(TaskAttemptContext).needsTaskCommit in class org.apache.hadoop.mapreduce.OutputCommitterjava.io.IOExceptionpublic void setupJob(org.apache.hadoop.mapreduce.JobContext context)
throws java.io.IOException
OutputCommitter.setupJob(JobContext).setupJob in class org.apache.hadoop.mapreduce.OutputCommitterjava.io.IOExceptionpublic void setupTask(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException
OutputCommitter.setupTask(TaskAttemptContext).setupTask in class org.apache.hadoop.mapreduce.OutputCommitterjava.io.IOExceptionprotected java.util.List<java.lang.String> getOutputFileURIs()
throws java.io.IOException
FileOutputCommitter.SUCCEEDED_FILE_NAME.java.io.IOException - if unable to query for the files in the base output directory.protected void cleanup(org.apache.hadoop.mapreduce.JobContext context)
throws java.io.IOException
context - the job content to cleanup.java.io.IOException - if a FileSystem exception is encountered.protected org.apache.hadoop.mapreduce.OutputCommitter getDelegate()
protected BigQueryHelper getBigQueryHelper()
Copyright © 2019. All rights reserved.