public final class HadoopInputs extends Object
It provides methods to create Flink InputFormat wrappers for Hadoop InputFormat
and InputFormat
.
Key value pairs produced by the Hadoop InputFormats are converted into Flink
Tuple2
objects where the first field
(Tuple2.f0
) is the key and the second field
(Tuple2.f1
) is the value.
Constructor and Description |
---|
HadoopInputs() |
Modifier and Type | Method and Description |
---|---|
static <K,V> HadoopInputFormat<K,V> |
createHadoopInput(org.apache.hadoop.mapreduce.InputFormat<K,V> mapreduceInputFormat,
Class<K> key,
Class<V> value,
org.apache.hadoop.mapreduce.Job job)
Creates a Flink
InputFormat that wraps the given Hadoop InputFormat . |
static <K,V> HadoopInputFormat<K,V> |
createHadoopInput(org.apache.hadoop.mapred.InputFormat<K,V> mapredInputFormat,
Class<K> key,
Class<V> value,
org.apache.hadoop.mapred.JobConf job)
Creates a Flink
InputFormat that wraps the given Hadoop InputFormat . |
static <K,V> HadoopInputFormat<K,V> |
readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K,V> mapredInputFormat,
Class<K> key,
Class<V> value,
String inputPath)
Creates a Flink
InputFormat that wraps the given Hadoop FileInputFormat . |
static <K,V> HadoopInputFormat<K,V> |
readHadoopFile(org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> mapreduceInputFormat,
Class<K> key,
Class<V> value,
String inputPath)
Creates a Flink
InputFormat that wraps the given Hadoop FileInputFormat . |
static <K,V> HadoopInputFormat<K,V> |
readHadoopFile(org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> mapreduceInputFormat,
Class<K> key,
Class<V> value,
String inputPath,
org.apache.hadoop.mapreduce.Job job)
Creates a Flink
InputFormat that wraps the given Hadoop FileInputFormat . |
static <K,V> HadoopInputFormat<K,V> |
readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K,V> mapredInputFormat,
Class<K> key,
Class<V> value,
String inputPath,
org.apache.hadoop.mapred.JobConf job)
Creates a Flink
InputFormat that wraps the given Hadoop FileInputFormat . |
static <K,V> HadoopInputFormat<K,V> |
readSequenceFile(Class<K> key,
Class<V> value,
String inputPath)
Creates a Flink
InputFormat to read a Hadoop sequence file for the given key and value classes. |
public static <K,V> HadoopInputFormat<K,V> readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K,V> mapredInputFormat, Class<K> key, Class<V> value, String inputPath, org.apache.hadoop.mapred.JobConf job)
InputFormat
that wraps the given Hadoop FileInputFormat
.public static <K,V> HadoopInputFormat<K,V> readHadoopFile(org.apache.hadoop.mapred.FileInputFormat<K,V> mapredInputFormat, Class<K> key, Class<V> value, String inputPath)
InputFormat
that wraps the given Hadoop FileInputFormat
.public static <K,V> HadoopInputFormat<K,V> readSequenceFile(Class<K> key, Class<V> value, String inputPath) throws IOException
InputFormat
to read a Hadoop sequence file for the given key and value classes.IOException
public static <K,V> HadoopInputFormat<K,V> createHadoopInput(org.apache.hadoop.mapred.InputFormat<K,V> mapredInputFormat, Class<K> key, Class<V> value, org.apache.hadoop.mapred.JobConf job)
InputFormat
that wraps the given Hadoop InputFormat
.public static <K,V> HadoopInputFormat<K,V> readHadoopFile(org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> mapreduceInputFormat, Class<K> key, Class<V> value, String inputPath, org.apache.hadoop.mapreduce.Job job) throws IOException
InputFormat
that wraps the given Hadoop FileInputFormat
.IOException
public static <K,V> HadoopInputFormat<K,V> readHadoopFile(org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V> mapreduceInputFormat, Class<K> key, Class<V> value, String inputPath) throws IOException
InputFormat
that wraps the given Hadoop FileInputFormat
.IOException
public static <K,V> HadoopInputFormat<K,V> createHadoopInput(org.apache.hadoop.mapreduce.InputFormat<K,V> mapreduceInputFormat, Class<K> key, Class<V> value, org.apache.hadoop.mapreduce.Job job)
InputFormat
that wraps the given Hadoop InputFormat
.Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.