This project has retired. For details please refer to its Attic page.
GoraRecordReader (Apache Gora 0.2 API)

org.apache.gora.mapreduce
Class GoraRecordReader<K,T extends Persistent>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<K,T>
      extended by org.apache.gora.mapreduce.GoraRecordReader<K,T>
All Implemented Interfaces:
Closeable

public class GoraRecordReader<K,T extends Persistent>
extends org.apache.hadoop.mapreduce.RecordReader<K,T>

An adapter for Result to Hadoop RecordReader.


Field Summary
static String BUFFER_LIMIT_READ_NAME
           
static int BUFFER_LIMIT_READ_VALUE
           
static org.slf4j.Logger LOG
           
protected  Query<K,T> query
           
protected  Result<K,T> result
           
 
Constructor Summary
GoraRecordReader(Query<K,T> query, org.apache.hadoop.mapreduce.TaskAttemptContext context)
           
 
Method Summary
 void close()
           
 void executeQuery()
           
 K getCurrentKey()
           
 T 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
 

Field Detail

LOG

public static final org.slf4j.Logger LOG

BUFFER_LIMIT_READ_NAME

public static final String BUFFER_LIMIT_READ_NAME
See Also:
Constant Field Values

BUFFER_LIMIT_READ_VALUE

public static final int BUFFER_LIMIT_READ_VALUE
See Also:
Constant Field Values

query

protected Query<K,T extends Persistent> query

result

protected Result<K,T extends Persistent> result
Constructor Detail

GoraRecordReader

public GoraRecordReader(Query<K,T> query,
                        org.apache.hadoop.mapreduce.TaskAttemptContext context)
Method Detail

executeQuery

public void executeQuery()
                  throws IOException
Throws:
IOException

getCurrentKey

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

getCurrentValue

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

getProgress

public float getProgress()
                  throws IOException,
                         InterruptedException
Specified by:
getProgress in class org.apache.hadoop.mapreduce.RecordReader<K,T extends Persistent>
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,T extends Persistent>
Throws:
IOException
InterruptedException

nextKeyValue

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

close

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


Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.