org.apache.hadoop.mapreduce.lib.input
Class MultipleInputs

java.lang.Object
  extended by org.apache.hadoop.mapreduce.lib.input.MultipleInputs

@InterfaceAudience.Public
@InterfaceStability.Stable
public class MultipleInputs
extends Object

This class supports MapReduce jobs that have multiple input paths with a different InputFormat and Mapper for each path


Field Summary
static String DIR_FORMATS
           
static String DIR_MAPPERS
           
 
Constructor Summary
MultipleInputs()
           
 
Method Summary
static void addInputPath(Job job, Path path, Class<? extends InputFormat> inputFormatClass)
          Add a Path with a custom InputFormat to the list of inputs for the map-reduce job.
static void addInputPath(Job job, Path path, Class<? extends InputFormat> inputFormatClass, Class<? extends Mapper> mapperClass)
          Add a Path with a custom InputFormat and Mapper to the list of inputs for the map-reduce job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIR_FORMATS

public static final String DIR_FORMATS
See Also:
Constant Field Values

DIR_MAPPERS

public static final String DIR_MAPPERS
See Also:
Constant Field Values
Constructor Detail

MultipleInputs

public MultipleInputs()
Method Detail

addInputPath

public static void addInputPath(Job job,
                                Path path,
                                Class<? extends InputFormat> inputFormatClass)
Add a Path with a custom InputFormat to the list of inputs for the map-reduce job.

Parameters:
job - The Job
path - Path to be added to the list of inputs for the job
inputFormatClass - InputFormat class to use for this path

addInputPath

public static void addInputPath(Job job,
                                Path path,
                                Class<? extends InputFormat> inputFormatClass,
                                Class<? extends Mapper> mapperClass)
Add a Path with a custom InputFormat and Mapper to the list of inputs for the map-reduce job.

Parameters:
job - The Job
path - Path to be added to the list of inputs for the job
inputFormatClass - InputFormat class to use for this path
mapperClass - Mapper class to use for this path


Copyright © 2009 The Apache Software Foundation