public class TeraInputFormat extends FileInputFormat<Text,Text>
FileInputFormat.CounterLOG| 构造器和说明 |
|---|
TeraInputFormat() |
| 限定符和类型 | 方法和说明 |
|---|---|
RecordReader<Text,Text> |
getRecordReader(InputSplit split,
JobConf job,
Reporter reporter)
Get the
RecordReader for the given InputSplit. |
InputSplit[] |
getSplits(JobConf conf,
int splits)
Splits files returned by
FileInputFormat.listStatus(JobConf) when
they're too big. |
static void |
writePartitionFile(JobConf conf,
Path partFile)
Use the input splits to take samples of the input and generate sample
keys.
|
addInputPath, addInputPaths, computeSplitSize, getBlockIndex, getInputPathFilter, getInputPaths, getSplitHosts, isSplitable, listStatus, setInputPathFilter, setInputPaths, setInputPaths, setMinSplitSizepublic static void writePartitionFile(JobConf conf, Path partFile) throws IOException
conf - the job to samplepartFile - where to write the output file toIOException - if something goes wrongpublic RecordReader<Text,Text> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException
InputFormatRecordReader for the given InputSplit.
It is the responsibility of the RecordReader to respect
record boundaries while processing the logical split to present a
record-oriented view to the individual task.
getRecordReader 在接口中 InputFormat<Text,Text>getRecordReader 在类中 FileInputFormat<Text,Text>split - the InputSplitjob - the job that this split belongs toRecordReaderIOExceptionpublic InputSplit[] getSplits(JobConf conf, int splits) throws IOException
FileInputFormatFileInputFormat.listStatus(JobConf) when
they're too big.getSplits 在接口中 InputFormat<Text,Text>getSplits 在类中 FileInputFormat<Text,Text>conf - job configuration.splits - the desired number of splits, a hint.InputSplits for the job.IOExceptionCopyright © 2009 The Apache Software Foundation