public abstract class HCatBaseInputFormat extends org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.WritableComparable,HCatRecord>
Constructor and Description |
---|
HCatBaseInputFormat() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.WritableComparable,HCatRecord> |
createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext taskContext)
Create the RecordReader for the given InputSplit.
|
protected static org.apache.hadoop.mapred.InputFormat<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable> |
getMapRedInputFormat(org.apache.hadoop.mapred.JobConf job,
Class inputFormatClass) |
List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext jobContext)
Logically split the set of input files for the job.
|
static HCatSchema |
getTableSchema(org.apache.hadoop.conf.Configuration conf)
Gets the HCatTable schema for the table specified in the HCatInputFormat.setInput call
on the specified job context.
|
static void |
setOutputSchema(org.apache.hadoop.mapreduce.Job job,
HCatSchema hcatSchema)
Set the schema for the HCatRecord data returned by HCatInputFormat.
|
public static void setOutputSchema(org.apache.hadoop.mapreduce.Job job, HCatSchema hcatSchema) throws IOException
job
- the job objecthcatSchema
- the schema to use as the consolidated schemaIOException
protected static org.apache.hadoop.mapred.InputFormat<org.apache.hadoop.io.WritableComparable,org.apache.hadoop.io.Writable> getMapRedInputFormat(org.apache.hadoop.mapred.JobConf job, Class inputFormatClass) throws IOException
IOException
public List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext jobContext) throws IOException, InterruptedException
getSplits
in class org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.WritableComparable,HCatRecord>
jobContext
- the job context objectIOException
- or InterruptedExceptionInterruptedException
public org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.WritableComparable,HCatRecord> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext taskContext) throws IOException, InterruptedException
createRecordReader
in class org.apache.hadoop.mapreduce.InputFormat<org.apache.hadoop.io.WritableComparable,HCatRecord>
split
- the splittaskContext
- the task attempt contextIOException
- or InterruptedExceptionInterruptedException
public static HCatSchema getTableSchema(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- the Configuration objectIOException
- if HCatInputFormat.setInput has not been called
for the current contextCopyright © 2017 The Apache Software Foundation. All rights reserved.