|
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.hadoop.indbmr.lib.input.HInputSplits
public class HInputSplits
A library to return the InputSplits of a given
JobContext
and serialize them to stdout or a file
If the goal is to get splits from a Hive table, the input format in the conf must be set to HiveToJavaInputFormat
Constructor Summary | |
---|---|
HInputSplits()
|
Method Summary | |
---|---|
protected org.apache.hadoop.mapreduce.InputFormat<?,?> |
createInputFormat(org.apache.hadoop.conf.Configuration conf)
|
java.util.List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext jobContext)
Reads the name of an input format class from a Hadoop Configuration, instantiates the InputFormat and returns a list of InputSplit |
void |
writeSplits(org.apache.hadoop.mapreduce.JobContext jobContext,
java.io.OutputStream os)
Serializes splits to an OutputStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HInputSplits()
Method Detail |
---|
public void writeSplits(org.apache.hadoop.mapreduce.JobContext jobContext, java.io.OutputStream os) throws java.io.IOException, java.lang.InterruptedException
OutputStream
How to serialize a split: Hadoop has an API for pluggable serialization frameworks. See 'Hadoop: A Definitive Guide' book for details. Here is the summary:
Old: In the mapred API, InputSplit
was
jobContext
-
java.io.IOException
java.lang.InterruptedException
public java.util.List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext jobContext) throws java.io.IOException, java.lang.InterruptedException
Hadoop needs a JobContext
to get splits. A Configuration is not enough. JobContext is a read-only
view of a Job
.
jobContext
-
java.io.IOException
java.lang.InterruptedException
protected org.apache.hadoop.mapreduce.InputFormat<?,?> createInputFormat(org.apache.hadoop.conf.Configuration conf)
|
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 |