K
- The type of the record's key. The same used by internalInputFormatV
- The type of the record's value. The same used by internalInputFormat.
public abstract class WrapperInputFormat<I,J,K,V>
extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<I,J>
FileInputFormat
.Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> |
iInputFormat |
Constructor and Description |
---|
WrapperInputFormat() |
Modifier and Type | Method and Description |
---|---|
static <K,V> org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> |
createInternalInputFormat(org.apache.hadoop.mapreduce.JobContext context) |
static org.apache.hadoop.mapreduce.InputSplit |
getFittingInputSplit(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.mapreduce.lib.input.FileInputFormat<?,?> inputFormat, org.apache.hadoop.mapreduce.InputSplit split)
Returns an instance of an InputSplit subclass appropriate for the given InputFormat.
|
org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> |
getInternalInputFormat(org.apache.hadoop.mapreduce.JobContext context)
Gets an instance of the class set as the internal input format
|
static <K,V> java.lang.Class<? extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V>> |
getInternalInputFormatClass(org.apache.hadoop.mapreduce.JobContext context)
Gets the internal input format type which is used to actually read the data.
|
static <K,V> RecordInfoProvider<K,V> |
getRecordInfoProvider(RecordInfoProvider<K,V> provider, org.apache.hadoop.mapreduce.JobContext job)
Gets an instance of the specified RecordInfoProvider implementation
|
static <K,V> java.lang.Class<? extends RecordInfoProvider<K,V>> |
getRecordInfoProviderClass(org.apache.hadoop.mapreduce.JobContext job)
Gets the class of the RecordInfoProvider implementation
|
java.util.List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext context) |
static <K,V> void |
setInternalInputFormatClass(org.apache.hadoop.mapreduce.JobContext job, java.lang.Class<? extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V>> iInputFormat)
Sets the internal input format type which is used to actually read the data.
|
static <K,V> void |
setRecordInfoProviderClass(org.apache.hadoop.mapreduce.JobContext job, java.lang.Class<? extends RecordInfoProvider<K,V>> provider)
Sets the class of the RecordInfoProvider implementation
|
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, isSplitable, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
public static <K,V> void setInternalInputFormatClass(org.apache.hadoop.mapreduce.JobContext job, java.lang.Class<? extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V>> iInputFormat)
job
- the job configurationiInputFormat
- a class which is a subclass of FileInputFormat or CombineFileInputFormatpublic static <K,V> java.lang.Class<? extends org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V>> getInternalInputFormatClass(org.apache.hadoop.mapreduce.JobContext context)
context
- the job configurationpublic static <K,V> org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> createInternalInputFormat(org.apache.hadoop.mapreduce.JobContext context)
public org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> getInternalInputFormat(org.apache.hadoop.mapreduce.JobContext context)
context
- the job configurationpublic static <K,V> void setRecordInfoProviderClass(org.apache.hadoop.mapreduce.JobContext job, java.lang.Class<? extends RecordInfoProvider<K,V>> provider)
job
- the job configurationprovider
- a class that extends from RecordInfoProviderpublic static <K,V> java.lang.Class<? extends RecordInfoProvider<K,V>> getRecordInfoProviderClass(org.apache.hadoop.mapreduce.JobContext job)
job
- the job configurationpublic static <K,V> RecordInfoProvider<K,V> getRecordInfoProvider(RecordInfoProvider<K,V> provider, org.apache.hadoop.mapreduce.JobContext job)
provider
- if null, a new instance will be returned, otherwise, the same instance will be returned. It is used to release the caller from checking if the instance is null.job
- the job configurationpublic java.util.List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context) throws java.io.IOException
public static org.apache.hadoop.mapreduce.InputSplit getFittingInputSplit(org.apache.hadoop.mapreduce.JobContext context, org.apache.hadoop.mapreduce.lib.input.FileInputFormat<?,?> inputFormat, org.apache.hadoop.mapreduce.InputSplit split) throws java.io.IOException
context
- the job configurationinputFormat
- an InputFormat instancesplit
- an InputSplit instancejava.io.IOException
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.