oracle.hadoop.loader.lib.input
Class OldToNewInputFormat<K,V>
java.lang.Object
org.apache.hadoop.mapreduce.InputFormat<K,V>
oracle.hadoop.loader.lib.input.OldToNewInputFormat<K,V>
public class OldToNewInputFormat<K,V>
- extends org.apache.hadoop.mapreduce.InputFormat<K,V>
An adaptor that wraps around a mapred InputFormat
to produce a mapreduce InputFormat
.
(hence the name of the class: Old[API]ToNew[API]InputFormat).
The name of the mapred InputFormat class is read from the conf:
PROPERTY_OLD_INPUTFORMAT_CLASS
.
Method Summary |
org.apache.hadoop.mapreduce.RecordReader<K,V> |
createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
|
java.util.List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext context)
|
static void |
setOldInputFormat(org.apache.hadoop.conf.Configuration conf,
java.lang.Class<? extends org.apache.hadoop.mapred.InputFormat> oldInputFormatClass)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROPERTY_OLD_INPUTFORMAT_CLASS
public static final java.lang.String PROPERTY_OLD_INPUTFORMAT_CLASS
- See Also:
- Constant Field Values
DEFAULT_OLD_INPUTFORMAT_CLASS
public static final java.lang.Class<? extends org.apache.hadoop.mapred.InputFormat> DEFAULT_OLD_INPUTFORMAT_CLASS
OldToNewInputFormat
public OldToNewInputFormat()
createRecordReader
public org.apache.hadoop.mapreduce.RecordReader<K,V> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws java.io.IOException,
java.lang.InterruptedException
- Specified by:
createRecordReader
in class org.apache.hadoop.mapreduce.InputFormat<K,V>
- Throws:
java.io.IOException
java.lang.InterruptedException
getSplits
public java.util.List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context)
throws java.io.IOException,
java.lang.InterruptedException
- Specified by:
getSplits
in class org.apache.hadoop.mapreduce.InputFormat<K,V>
- Throws:
java.io.IOException
java.lang.InterruptedException
setOldInputFormat
public static void setOldInputFormat(org.apache.hadoop.conf.Configuration conf,
java.lang.Class<? extends org.apache.hadoop.mapred.InputFormat> oldInputFormatClass)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.