public class FormatBundle<K> extends Object implements Serializable, org.apache.hadoop.io.Writable, org.apache.hadoop.conf.Configurable
InputFormat
or OutputFormat
and any extra
configuration information that format class needs to run.
The FormatBundle
allow us to let different formats act as
if they are the only format that exists in a particular MapReduce job, even
when we have multiple types of inputs and outputs within a single job.
Constructor and Description |
---|
FormatBundle() |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.conf.Configuration |
configure(org.apache.hadoop.conf.Configuration conf) |
boolean |
equals(Object other) |
static <T extends org.apache.hadoop.mapreduce.InputFormat<?,?>> |
forInput(Class<T> inputFormatClass) |
static <T extends org.apache.hadoop.mapreduce.OutputFormat<?,?>> |
forOutput(Class<T> outputFormatClass) |
static <T> FormatBundle<T> |
fromSerialized(String serialized,
org.apache.hadoop.conf.Configuration conf) |
org.apache.hadoop.conf.Configuration |
getConf() |
Class<K> |
getFormatClass() |
String |
getName() |
int |
hashCode() |
void |
readFields(DataInput in) |
String |
serialize() |
FormatBundle<K> |
set(String key,
String value) |
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
void |
write(DataOutput out) |
public static <T> FormatBundle<T> fromSerialized(String serialized, org.apache.hadoop.conf.Configuration conf)
public static <T extends org.apache.hadoop.mapreduce.InputFormat<?,?>> FormatBundle<T> forInput(Class<T> inputFormatClass)
public static <T extends org.apache.hadoop.mapreduce.OutputFormat<?,?>> FormatBundle<T> forOutput(Class<T> outputFormatClass)
public FormatBundle<K> set(String key, String value)
public org.apache.hadoop.conf.Configuration configure(org.apache.hadoop.conf.Configuration conf)
public String serialize()
public String getName()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public org.apache.hadoop.conf.Configuration getConf()
getConf
in interface org.apache.hadoop.conf.Configurable
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf
in interface org.apache.hadoop.conf.Configurable
Copyright © 2016 The Apache Software Foundation. All rights reserved.