elasticsearch-hadoop-pig

org.elasticsearch.hadoop.mr
Class EsInputFormat.ShardRecordReader<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordReader<K,V>
      extended by org.elasticsearch.hadoop.mr.EsInputFormat.ShardRecordReader<K,V>
All Implemented Interfaces:
Closeable, RecordReader<K,V>
Direct Known Subclasses:
EsInputFormat.WritableShardRecordReader, EsPigInputFormat.PigShardRecordReader
Enclosing class:
EsInputFormat<K,V>

protected abstract static class EsInputFormat.ShardRecordReader<K,V>
extends RecordReader<K,V>
implements RecordReader<K,V>


Constructor Summary
EsInputFormat.ShardRecordReader()
           
EsInputFormat.ShardRecordReader(InputSplit split, Configuration job, Reporter reporter)
           
 
Method Summary
 void close()
           
abstract  K createKey()
           
abstract  V createValue()
           
 K getCurrentKey()
           
 V getCurrentValue()
           
 long getPos()
           
 float getProgress()
           
 void initialize(InputSplit split, TaskAttemptContext context)
           
 boolean next(K key, V value)
           
 boolean nextKeyValue()
           
protected abstract  K setCurrentKey(K oldApiKey, K newApiKey, Object object)
           
protected abstract  V setCurrentValue(V oldApiValue, V newApiKey, Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EsInputFormat.ShardRecordReader

public EsInputFormat.ShardRecordReader()

EsInputFormat.ShardRecordReader

public EsInputFormat.ShardRecordReader(InputSplit split,
                                       Configuration job,
                                       Reporter reporter)
Method Detail

initialize

public void initialize(InputSplit split,
                       TaskAttemptContext context)
                throws IOException
Specified by:
initialize in class RecordReader<K,V>
Throws:
IOException

nextKeyValue

public boolean nextKeyValue()
                     throws IOException
Specified by:
nextKeyValue in class RecordReader<K,V>
Throws:
IOException

getCurrentKey

public K getCurrentKey()
                throws IOException
Specified by:
getCurrentKey in class RecordReader<K,V>
Throws:
IOException

getCurrentValue

public V getCurrentValue()
Specified by:
getCurrentValue in class RecordReader<K,V>

getProgress

public float getProgress()
Specified by:
getProgress in interface RecordReader<K,V>
Specified by:
getProgress in class RecordReader<K,V>

close

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

next

public boolean next(K key,
                    V value)
             throws IOException
Specified by:
next in interface RecordReader<K,V>
Throws:
IOException

createKey

public abstract K createKey()
Specified by:
createKey in interface RecordReader<K,V>

createValue

public abstract V createValue()
Specified by:
createValue in interface RecordReader<K,V>

setCurrentKey

protected abstract K setCurrentKey(K oldApiKey,
                                   K newApiKey,
                                   Object object)

setCurrentValue

protected abstract V setCurrentValue(V oldApiValue,
                                     V newApiKey,
                                     Object object)

getPos

public long getPos()
Specified by:
getPos in interface RecordReader<K,V>

elasticsearch-hadoop-pig