org.apache.hadoop.vertica
Class VerticaRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>
      extended by org.apache.hadoop.vertica.VerticaRecordReader
All Implemented Interfaces:
Closeable

public class VerticaRecordReader
extends RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>


Constructor Summary
VerticaRecordReader(VerticaInputSplit split, org.apache.hadoop.conf.Configuration job)
           
 
Method Summary
 void close()
          Close the record reader.
 org.apache.hadoop.io.LongWritable getCurrentKey()
          Get the current key
 VerticaRecord getCurrentValue()
          Get the current value.
 long getPos()
           
 float getProgress()
          The current progress of the record reader through its data.
 void initialize(InputSplit split, TaskAttemptContext context)
          Called once at initialization.
 boolean next(org.apache.hadoop.io.LongWritable key, VerticaRecord value)
           
 boolean nextKeyValue()
          Read the next key, value pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VerticaRecordReader

public VerticaRecordReader(VerticaInputSplit split,
                           org.apache.hadoop.conf.Configuration job)
                    throws Exception
Throws:
Exception
Method Detail

initialize

public void initialize(InputSplit split,
                       TaskAttemptContext context)
                throws IOException,
                       InterruptedException
Description copied from class: RecordReader
Called once at initialization.

Specified by:
initialize in class RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>
Parameters:
split - the split that defines the range of records to read
context - the information about the task
Throws:
IOException
InterruptedException

close

public void close()
           throws IOException
Close the record reader.

Specified by:
close in interface Closeable
Specified by:
close in class RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>
Throws:
IOException

getPos

public long getPos()
            throws IOException
Throws:
IOException

getProgress

public float getProgress()
                  throws IOException
Description copied from class: RecordReader
The current progress of the record reader through its data.

Specified by:
getProgress in class RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>
Returns:
a number between 0.0 and 1.0 that is the fraction of the data read
Throws:
IOException

next

public boolean next(org.apache.hadoop.io.LongWritable key,
                    VerticaRecord value)
             throws IOException
Throws:
IOException

getCurrentKey

public org.apache.hadoop.io.LongWritable getCurrentKey()
                                                throws IOException,
                                                       InterruptedException
Description copied from class: RecordReader
Get the current key

Specified by:
getCurrentKey in class RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>
Returns:
the current key or null if there is no current key
Throws:
IOException
InterruptedException

getCurrentValue

public VerticaRecord getCurrentValue()
                              throws IOException,
                                     InterruptedException
Description copied from class: RecordReader
Get the current value.

Specified by:
getCurrentValue in class RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>
Returns:
the object that was read
Throws:
IOException
InterruptedException

nextKeyValue

public boolean nextKeyValue()
                     throws IOException,
                            InterruptedException
Description copied from class: RecordReader
Read the next key, value pair.

Specified by:
nextKeyValue in class RecordReader<org.apache.hadoop.io.LongWritable,VerticaRecord>
Returns:
true if a key/value pair was read
Throws:
IOException
InterruptedException


Copyright © 2009 The Apache Software Foundation