|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.RecordReader<K,V>
org.apache.hadoop.tools.mapred.lib.DynamicRecordReader<K,V>
public class DynamicRecordReader<K,V>
The DynamicRecordReader is used in conjunction with the DynamicInputFormat to implement the "Worker pattern" for DistCp. The DynamicRecordReader is responsible for: 1. Presenting the contents of each chunk to DistCp's mapper. 2. Acquiring a new chunk when the current chunk has been completely consumed, transparently.
| Constructor Summary | |
|---|---|
DynamicRecordReader(int numEntriesPerChunk)
|
|
| Method Summary | |
|---|---|
void |
close()
Implementation of RecordReader::close(). |
K |
getCurrentKey()
Implementation of RecordReader::getCurrentKey(). |
V |
getCurrentValue()
Implementation of RecordReader::getCurrentValue(). |
float |
getProgress()
Implementation of RecordReader::getProgress(). |
void |
initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext)
Implementation for RecordReader::initialize(). |
boolean |
nextKeyValue()
Implementation of RecordReader::nextValue(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DynamicRecordReader(int numEntriesPerChunk)
| Method Detail |
|---|
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext)
throws IOException,
InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<K,V>inputSplit: - The InputSplit for the map. Ignored entirely.taskAttemptContext: - The AttemptContext.
IOException, - on failure.
InterruptedException
IOException
public boolean nextKeyValue()
throws IOException,
InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOException, - on failure.
InterruptedException
IOException
public K getCurrentKey()
throws IOException,
InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOException, - on failure.
InterruptedException
IOException
public V getCurrentValue()
throws IOException,
InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOException, - on failure.
InterruptedException
IOException
public float getProgress()
throws IOException,
InterruptedException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOException, - on failure.
InterruptedException
IOException
public void close()
throws IOException
close in interface Closeableclose in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOException, - on failure.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||