com.datasalt.pangool.tuplemr.mapred.lib.input
Class TupleFileRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<ITuple,org.apache.hadoop.io.NullWritable>
      extended by com.datasalt.pangool.tuplemr.mapred.lib.input.TupleFileRecordReader
All Implemented Interfaces:
Closeable

public class TupleFileRecordReader
extends org.apache.hadoop.mapreduce.RecordReader<ITuple,org.apache.hadoop.io.NullWritable>

An RecordReader for TupleFiles.


Field Summary
protected  org.apache.hadoop.conf.Configuration conf
           
 
Constructor Summary
TupleFileRecordReader()
           
TupleFileRecordReader(Schema targetSchema)
          If a schema is specified, it will be used as target schema, trying to preserve backwards compatibility always when possible.
 
Method Summary
 void close()
           
 ITuple getCurrentKey()
           
 org.apache.hadoop.io.NullWritable getCurrentValue()
           
 float getProgress()
          Return the progress within the input split
 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
 

Field Detail

conf

protected org.apache.hadoop.conf.Configuration conf
Constructor Detail

TupleFileRecordReader

public TupleFileRecordReader()

TupleFileRecordReader

public TupleFileRecordReader(Schema targetSchema)
If a schema is specified, it will be used as target schema, trying to preserve backwards compatibility always when possible.

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<ITuple,org.apache.hadoop.io.NullWritable>
Throws:
IOException
InterruptedException

nextKeyValue

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

getCurrentKey

public ITuple getCurrentKey()
Specified by:
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<ITuple,org.apache.hadoop.io.NullWritable>

getCurrentValue

public org.apache.hadoop.io.NullWritable getCurrentValue()
Specified by:
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<ITuple,org.apache.hadoop.io.NullWritable>

getProgress

public float getProgress()
                  throws IOException
Return the progress within the input split

Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<ITuple,org.apache.hadoop.io.NullWritable>
Returns:
0.0 to 1.0 of the input byte range
Throws:
IOException

close

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


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