org.apache.hadoop.examples
Class MultiFileWordCount.MyInputFormat

java.lang.Object
  extended by org.apache.hadoop.mapreduce.InputFormat<K,V>
      extended by org.apache.hadoop.mapreduce.lib.input.FileInputFormat<K,V>
          extended by org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
              extended by org.apache.hadoop.examples.MultiFileWordCount.MyInputFormat
Enclosing class:
MultiFileWordCount

public static class MultiFileWordCount.MyInputFormat
extends org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>

To use CombineFileInputFormat, one should extend it, to return a (custom) RecordReader. CombineFileInputFormat uses CombineFileSplits.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat
org.apache.hadoop.mapreduce.lib.input.FileInputFormat.Counter
 
Field Summary
 
Fields inherited from class org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat
SPLIT_MINSIZE_PERNODE, SPLIT_MINSIZE_PERRACK
 
Fields inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat
INPUT_DIR, INPUT_DIR_RECURSIVE, NUM_INPUT_FILES, PATHFILTER_CLASS, SPLIT_MAXSIZE, SPLIT_MINSIZE
 
Constructor Summary
MultiFileWordCount.MyInputFormat()
           
 
Method Summary
 org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
 
Methods inherited from class org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat
createPool, createPool, getFileBlockLocations, getSplits, isSplitable, setMaxSplitSize, setMinSplitSizeNode, setMinSplitSizeRack
 
Methods inherited from class org.apache.hadoop.mapreduce.lib.input.FileInputFormat
addInputPath, addInputPathRecursively, addInputPaths, computeSplitSize, getBlockIndex, getFormatMinSplitSize, getInputDirRecursive, getInputPathFilter, getInputPaths, getMaxSplitSize, getMinSplitSize, listStatus, makeSplit, setInputDirRecursive, setInputPathFilter, setInputPaths, setInputPaths, setMaxInputSplitSize, setMinInputSplitSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiFileWordCount.MyInputFormat

public MultiFileWordCount.MyInputFormat()
Method Detail

createRecordReader

public org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text> createRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
                                                                                                                            org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                                                                     throws IOException
Specified by:
createRecordReader in class org.apache.hadoop.mapreduce.lib.input.CombineFileInputFormat<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
Throws:
IOException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.