@InterfaceAudience.Public @InterfaceStability.Stable public class CompositeInputFormat<K extends WritableComparable> extends InputFormat<K,TupleWritable>
Modifier and Type | Field and Description |
---|---|
static String |
JOIN_COMPARATOR |
static String |
JOIN_EXPR |
Constructor and Description |
---|
CompositeInputFormat() |
Modifier and Type | Method and Description |
---|---|
protected void |
addDefaults()
Adds the default set of identifiers to the parser.
|
static String |
compose(Class<? extends InputFormat> inf,
String path)
Convenience method for constructing composite formats.
|
static String |
compose(String op,
Class<? extends InputFormat> inf,
Path... path)
Convenience method for constructing composite formats.
|
static String |
compose(String op,
Class<? extends InputFormat> inf,
String... path)
Convenience method for constructing composite formats.
|
RecordReader<K,TupleWritable> |
createRecordReader(InputSplit split,
TaskAttemptContext taskContext)
Construct a CompositeRecordReader for the children of this InputFormat
as defined in the init expression.
|
List<InputSplit> |
getSplits(JobContext job)
Build a CompositeInputSplit from the child InputFormats by assigning the
ith split from each child to the ith composite split.
|
void |
setFormat(Configuration conf)
Interpret a given string as a composite expression.
|
public static final String JOIN_EXPR
public static final String JOIN_COMPARATOR
public void setFormat(Configuration conf) throws IOException
func ::= <ident>([<func>,]*<func>)
func ::= tbl(<class>,"<path>")
class ::= @see java.lang.Class#forName(java.lang.String)
path ::= @see org.apache.hadoop.fs.Path#Path(java.lang.String)
Reads expression from the mapreduce.join.expr property and
user-supplied join types from mapreduce.join.define.<ident>
types. Paths supplied to tbl are given as input paths to the
InputFormat class listed.IOException
compose(java.lang.String, java.lang.Class, java.lang.String...)
protected void addDefaults()
public List<InputSplit> getSplits(JobContext job) throws IOException, InterruptedException
getSplits
in class InputFormat<K extends WritableComparable,TupleWritable>
job
- job configuration.InputSplit
s for the job.IOException
InterruptedException
public RecordReader<K,TupleWritable> createRecordReader(InputSplit split, TaskAttemptContext taskContext) throws IOException, InterruptedException
createRecordReader
in class InputFormat<K extends WritableComparable,TupleWritable>
split
- the split to be readtaskContext
- the information about the taskIOException
InterruptedException
public static String compose(Class<? extends InputFormat> inf, String path)
tbl(<inf>, <p>)
public static String compose(String op, Class<? extends InputFormat> inf, String... path)
<op>(tbl(<inf>,<p1>),tbl(<inf>,<p2>),...,tbl(<inf>,<pn>))
public static String compose(String op, Class<? extends InputFormat> inf, Path... path)
<op>(tbl(<inf>,<p1>),tbl(<inf>,<p2>),...,tbl(<inf>,<pn>))
Copyright © 2024 Apache Software Foundation. All rights reserved.