org.apache.hadoop.mapreduce.task.reduce
Class InMemoryReader<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapred.IFile.Reader<K,V>
      extended by org.apache.hadoop.mapreduce.task.reduce.InMemoryReader<K,V>

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class InMemoryReader<K,V>
extends IFile.Reader<K,V>

IFile.InMemoryReader to read map-outputs present in-memory.


Field Summary
 
Fields inherited from class org.apache.hadoop.mapred.IFile.Reader
buffer, bufferSize, bytesRead, currentKeyLength, currentValueLength, dataIn, eof, fileLength, recNo
 
Constructor Summary
InMemoryReader(MergeManager<K,V> merger, TaskAttemptID taskAttemptId, byte[] data, int start, int length)
           
 
Method Summary
 void close()
           
 long getLength()
           
 long getPosition()
           
 boolean nextRawKey(org.apache.hadoop.io.DataInputBuffer key)
           
 void nextRawValue(org.apache.hadoop.io.DataInputBuffer value)
           
 void reset(int offset)
           
 
Methods inherited from class org.apache.hadoop.mapred.IFile.Reader
disableChecksumValidation, positionToNextRecord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryReader

public InMemoryReader(MergeManager<K,V> merger,
                      TaskAttemptID taskAttemptId,
                      byte[] data,
                      int start,
                      int length)
               throws IOException
Throws:
IOException
Method Detail

reset

public void reset(int offset)
Overrides:
reset in class IFile.Reader<K,V>

getPosition

public long getPosition()
                 throws IOException
Overrides:
getPosition in class IFile.Reader<K,V>
Throws:
IOException

getLength

public long getLength()
Overrides:
getLength in class IFile.Reader<K,V>

nextRawKey

public boolean nextRawKey(org.apache.hadoop.io.DataInputBuffer key)
                   throws IOException
Overrides:
nextRawKey in class IFile.Reader<K,V>
Throws:
IOException

nextRawValue

public void nextRawValue(org.apache.hadoop.io.DataInputBuffer value)
                  throws IOException
Overrides:
nextRawValue in class IFile.Reader<K,V>
Throws:
IOException

close

public void close()
Overrides:
close in class IFile.Reader<K,V>


Copyright © 2012 Apache Software Foundation. All Rights Reserved.