org.apache.hadoop.examples
Class MultiFileWordCount.CombineFileLineRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
      extended by org.apache.hadoop.examples.MultiFileWordCount.CombineFileLineRecordReader
All Implemented Interfaces:
Closeable
Enclosing class:
MultiFileWordCount

public static class MultiFileWordCount.CombineFileLineRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>

RecordReader is responsible from extracting records from a chunk of the CombineFileSplit.


Constructor Summary
MultiFileWordCount.CombineFileLineRecordReader(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context, Integer index)
           
 
Method Summary
 void close()
           
 MultiFileWordCount.WordOffset getCurrentKey()
           
 org.apache.hadoop.io.Text getCurrentValue()
           
 float getProgress()
           
 void initialize(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
 boolean nextKeyValue()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiFileWordCount.CombineFileLineRecordReader

public MultiFileWordCount.CombineFileLineRecordReader(org.apache.hadoop.mapreduce.lib.input.CombineFileSplit split,
                                                      org.apache.hadoop.mapreduce.TaskAttemptContext context,
                                                      Integer index)
                                               throws IOException
Throws:
IOException
Method Detail

initialize

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

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Specified by:
close in class org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
Throws:
IOException

getProgress

public float getProgress()
                  throws IOException
Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
Throws:
IOException

nextKeyValue

public boolean nextKeyValue()
                     throws IOException
Specified by:
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
Throws:
IOException

getCurrentKey

public MultiFileWordCount.WordOffset getCurrentKey()
                                            throws IOException,
                                                   InterruptedException
Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
Throws:
IOException
InterruptedException

getCurrentValue

public org.apache.hadoop.io.Text getCurrentValue()
                                          throws IOException,
                                                 InterruptedException
Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
Throws:
IOException
InterruptedException


Copyright © 2013 Apache Software Foundation. All Rights Reserved.