|
Oracle® In-Database Container for Hadoop Java API Reference Release 1.0.1 E54638-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.sql.hadoop.DBMultipleInputs
public class DBMultipleInputs
This class supports MapReduce jobs that have multiple input tables with
a different Mapper
for each table
Constructor Summary | |
---|---|
DBMultipleInputs()
|
Method Summary | |
---|---|
static void |
addInputTable(Job job,
java.lang.String table,
java.lang.Class<? extends org.apache.hadoop.mapreduce.Mapper> mapperClass)
Add a table with a custom Mapper to the list of inputs for the
map-reduce job. |
static void |
addInputTable(Job job,
java.lang.String table,
java.lang.Class<? extends org.apache.hadoop.mapreduce.Mapper> mapperClass,
java.lang.Class<?> keyClass,
java.lang.Class<?> valueClass)
Add a table with a custom 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 |
Constructor Detail |
---|
public DBMultipleInputs()
Method Detail |
---|
public static void addInputTable(Job job, java.lang.String table, java.lang.Class<? extends org.apache.hadoop.mapreduce.Mapper> mapperClass) throws java.io.IOException
Mapper
to the list of inputs for the
map-reduce job.
Example:
Job job = new Job(Configuration conf); ... job.setOutputTableName("OutTable"); DBMultipleInputs.addInputTable(job, "InTableA", MapperA.class); DBMultipleInputs.addInputTable(job, "InTableB", MapperB.class); job.init(); job.run(); Job will run as: (InTableA->MapperA UNION ALL InTableB->MapperB)->ReducerOfJob->OutTable
job
- The Job
table
- String
to be added to the list of inputs for the jobmapperClass
- Mapper
class to use for this table
java.io.IOException
public static void addInputTable(Job job, java.lang.String table, java.lang.Class<? extends org.apache.hadoop.mapreduce.Mapper> mapperClass, java.lang.Class<?> keyClass, java.lang.Class<?> valueClass) throws java.io.IOException
Mapper
to the list of inputs for the
map-reduce job.
Example:
Job job = new Job(Configuration conf); ... job.setOutputTableName("OutTable"); DBMultipleInputs.addInputTable(job, "InTableA", MapperA.class, IntWritable.class, Text.class); DBMultipleInputs.addInputTable(job, "InTableB", MapperB.class, IntWritable.class, DoubleWritable.class); job.init(); job.run(); Job will run as: (InTableA->MapperA UNION ALL InTableB->MapperB)->ReducerOfJob->OutTable
job
- The Job
table
- String
to be added to the list of inputs for the jobmapperClass
- Mapper
class to use for this tablekeyClass
- the input key class for mappervalueClass
- the input value class for mapper
java.io.IOException
|
Oracle® In-Database Container for Hadoop Java API Reference Release 1.0.1 E54638-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |