org.apache.hadoop.examples
Class MultiFileWordCount.CombineFileLineRecordReader
java.lang.Object
org.apache.hadoop.mapreduce.RecordReader<MultiFileWordCount.WordOffset,org.apache.hadoop.io.Text>
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 © 2014 Apache Software Foundation. All Rights Reserved.