com.datasalt.pangool.tuplemr.mapred.lib.input
Class DelegatingRecordReader<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<K,V>
      extended by com.datasalt.pangool.tuplemr.mapred.lib.input.DelegatingRecordReader<K,V>
All Implemented Interfaces:
Closeable

public class DelegatingRecordReader<K,V>
extends org.apache.hadoop.mapreduce.RecordReader<K,V>

This is a delegating RecordReader, which delegates the functionality to the underlying record reader in TaggedInputSplit


Constructor Summary
DelegatingRecordReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
          Constructs the DelegatingRecordReader.
 
Method Summary
 void close()
           
 K getCurrentKey()
           
 V 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

DelegatingRecordReader

public DelegatingRecordReader(org.apache.hadoop.mapreduce.InputSplit split,
                              org.apache.hadoop.mapreduce.TaskAttemptContext context)
                       throws IOException,
                              InterruptedException
Constructs the DelegatingRecordReader.

Parameters:
split - TaggegInputSplit object
context - TaskAttemptContext object
Throws:
IOException
InterruptedException
Method Detail

close

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

getCurrentKey

public K getCurrentKey()
                throws IOException,
                       InterruptedException
Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException

getCurrentValue

public V getCurrentValue()
                  throws IOException,
                         InterruptedException
Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException

getProgress

public float getProgress()
                  throws IOException,
                         InterruptedException
Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException

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<K,V>
Throws:
IOException
InterruptedException

nextKeyValue

public boolean nextKeyValue()
                     throws IOException,
                            InterruptedException
Specified by:
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>
Throws:
IOException
InterruptedException


Copyright © –2014 Datasalt Systems S.L.. All rights reserved.