|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapred.InputFormatBase
public abstract class InputFormatBase
A base class for InputFormat.
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
InputFormatBase()
|
|
| Method Summary | |
|---|---|
abstract RecordReader |
getRecordReader(InputSplit split,
JobConf job,
Reporter reporter)
Construct a RecordReader for a FileSplit. |
InputSplit[] |
getSplits(JobConf job,
int numSplits)
Splits files returned by listPaths(JobConf) when
they're too big. |
protected boolean |
isSplitable(FileSystem fs,
Path filename)
Is the given filename splitable? Usually, true, but if the file is stream compressed, it will not be. |
protected Path[] |
listPaths(JobConf job)
List input directories. |
protected void |
setMinSplitSize(long minSplitSize)
|
void |
validateInput(JobConf job)
Are the input directories valid? This method is used to test the input directories when a job is submitted so that the framework can fail early with a useful error message when the input directory does not exist. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public InputFormatBase()
| Method Detail |
|---|
protected void setMinSplitSize(long minSplitSize)
protected boolean isSplitable(FileSystem fs,
Path filename)
fs - the file system that the file is onfilename - the file name to check
public abstract RecordReader getRecordReader(InputSplit split,
JobConf job,
Reporter reporter)
throws IOException
InputFormatRecordReader for a FileSplit.
getRecordReader in interface InputFormatsplit - the InputSplitjob - the job that this split belongs to
RecordReader
IOException
protected Path[] listPaths(JobConf job)
throws IOException
job - the job to list input paths for
IOException - if zero items.
public void validateInput(JobConf job)
throws IOException
InputFormat
validateInput in interface InputFormatjob - the job to check
InvalidInputException - if the job does not have valid input
IOException
public InputSplit[] getSplits(JobConf job,
int numSplits)
throws IOException
listPaths(JobConf) when
they're too big.
getSplits in interface InputFormatjob - the job whose input files are to be splitnumSplits - the desired number of splits
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||