K
- The type of the internalInputFormat's keysV
- The type of the internalInputFormat's values
public class AdapterInputFormat<K,V>
extends <any>
This input format works as an adapter for subclasses of the new API' org.apache.hadoop.mapreduce.lib.input.FileInputFormat
The internal InputFormat class must be set using the static method AdapterInputFormat#setInternalInputFormatClass(JobConf, Class)
Note that when using a new API' InputFormat with SpatialIndexingMapper
it will be not possible to get the start position for each record so the index' entries will not contain the record pointer information (offset and length).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NEW_INPUT_FORMAT |
Constructor and Description |
---|
AdapterInputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
configure(JobConf conf) |
<any> |
getInternalInputFormat(JobConf conf)
Gets an instance of the class set as the internal input format
|
static <K,V> java.lang.Class<? extends <any>> |
getInternalInputFormatClass(JobConf conf)
Gets the internal input format type which is used to actually read the data.
|
<any> |
getRecordReader(InputSplit split, JobConf conf, Reporter reporter) |
InputSplit[] |
getSplits(JobConf conf, int arg1) |
static <K,V> void |
setInternalInputFormatClass(JobConf conf, java.lang.Class<? extends <any>> inputFormatClass)
Sets the internal input format type which is used to actually read the data.
|
public static final java.lang.String NEW_INPUT_FORMAT
public void configure(JobConf conf)
public <any> getInternalInputFormat(JobConf conf)
conf
- the job configurationpublic static <K,V> java.lang.Class<? extends <any>> getInternalInputFormatClass(JobConf conf)
conf
- the job configurationpublic <any> getRecordReader(InputSplit split, JobConf conf, Reporter reporter) throws java.io.IOException
java.io.IOException
public InputSplit[] getSplits(JobConf conf, int arg1) throws java.io.IOException
java.io.IOException
public static <K,V> void setInternalInputFormatClass(JobConf conf, java.lang.Class<? extends <any>> inputFormatClass)
conf
- the job configurationinputFormatClass
- a class of type org.apache.hadoop.mapreduce.lib.input.FileInputFormatCopyright © 2017 Oracle and/or its affiliates. All Rights Reserved.