@InterfaceAudience.Public @InterfaceStability.Stable public class DBOutputFormat<K extends DBWritable,V> extends DBOutputFormat<K,V> implements OutputFormat<K,V>
| Constructor and Description | 
|---|
| DBOutputFormat() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | checkOutputSpecs(FileSystem filesystem,
                                JobConf job)Check for validity of the output-specification for the job. | 
| RecordWriter<K,V> | getRecordWriter(FileSystem filesystem,
                              JobConf job,
                              String name,
                              Progressable progress)Get the  RecordWriterfor the given job. | 
| static void | setOutput(JobConf job,
                  String tableName,
                  int fieldCount)Initializes the reduce-part of the job with the appropriate output settings | 
| static void | setOutput(JobConf job,
                  String tableName,
                  String... fieldNames)Initializes the reduce-part of the job with the appropriate output settings | 
checkOutputSpecs, constructQuery, getOutputCommitter, getRecordWriter, setOutput, setOutputpublic DBOutputFormat()
public void checkOutputSpecs(FileSystem filesystem, JobConf job) throws IOException
This is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten.
checkOutputSpecs in interface OutputFormat<K extends DBWritable,V>job - job configuration.IOException - when output should not be attemptedpublic RecordWriter<K,V> getRecordWriter(FileSystem filesystem, JobConf job, String name, Progressable progress) throws IOException
RecordWriter for the given job.getRecordWriter in interface OutputFormat<K extends DBWritable,V>job - configuration for the job whose output is being written.name - the unique name for this part of the output.progress - mechanism for reporting progress while writing to file.RecordWriter to write the output for the job.IOExceptionpublic static void setOutput(JobConf job, String tableName, String... fieldNames)
job - The jobtableName - The table to insert data intofieldNames - The field names in the table.Copyright © 2015 Apache Software Foundation. All rights reserved.