public abstract class HCatBaseOutputFormat extends org.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.WritableComparable<?>,HCatRecord>
Constructor and Description |
---|
HCatBaseOutputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
Check for validity of the output-specification for the job.
|
protected static void |
configureOutputStorageHandler(org.apache.hadoop.mapreduce.JobContext context,
OutputJobInfo jobInfo,
Map<String,String> fullPartSpec)
Configure the output storage handler, with allowing specification
of partvals from which it picks the dynamic partvals
|
static OutputJobInfo |
getJobInfo(org.apache.hadoop.conf.Configuration conf)
Gets the HCatOuputJobInfo object by reading the Configuration and deserializing
the string.
|
protected org.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.WritableComparable<?>,HCatRecord> |
getOutputFormat(org.apache.hadoop.mapreduce.JobContext context)
Gets the output format instance.
|
static HCatSchema |
getTableSchema(org.apache.hadoop.conf.Configuration conf)
Gets the table schema for the table specified in the HCatOutputFormat.setOutput call
on the specified job context.
|
protected static void |
setPartDetails(OutputJobInfo jobInfo,
HCatSchema schema,
Map<String,String> partMap) |
public static HCatSchema getTableSchema(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- the Configuration objectIOException
- if HCatOutputFormat.setOutput has not been called for the passed contextpublic void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context) throws IOException, InterruptedException
checkOutputSpecs
in class org.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.WritableComparable<?>,HCatRecord>
context
- information about the jobIOException
- when output should not be attemptedInterruptedException
protected org.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.WritableComparable<?>,HCatRecord> getOutputFormat(org.apache.hadoop.mapreduce.JobContext context) throws IOException
context
- the job contextIOException
public static OutputJobInfo getJobInfo(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- the job Configuration objectIOException
- the IO exceptionprotected static void configureOutputStorageHandler(org.apache.hadoop.mapreduce.JobContext context, OutputJobInfo jobInfo, Map<String,String> fullPartSpec) throws IOException
context
- the job contextjobInfo
- the output job infofullPartSpec
- IOException
protected static void setPartDetails(OutputJobInfo jobInfo, HCatSchema schema, Map<String,String> partMap) throws HCatException, IOException
HCatException
IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.