@InterfaceAudience.Public @InterfaceStability.Stable public class WrappedRecordReader<K extends WritableComparable<?>,U extends Writable> extends ComposableRecordReader<K,U>
Modifier and Type | Field and Description |
---|---|
protected WritableComparator |
cmp |
protected boolean |
empty |
Modifier | Constructor and Description |
---|---|
protected |
WrappedRecordReader(int id) |
Modifier and Type | Method and Description |
---|---|
void |
accept(org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader.JoinCollector i,
K key)
Add an iterator to the collector at the position occupied by this
RecordReader over the values in this stream paired with the key
provided (ie register a stream of values from this source matching K
with a collector).
|
void |
close()
Forward close request to proxied RR.
|
int |
compareTo(ComposableRecordReader<K,?> other)
Implement Comparable contract (compare key at head of proxied RR
with that of another).
|
K |
createKey()
Request new key from proxied RR.
|
U |
createValue()
Create instance of value.
|
boolean |
equals(Object other)
Return true iff compareTo(other) retn true.
|
K |
getCurrentKey()
Get current key
|
U |
getCurrentValue()
Get current value
|
float |
getProgress()
Request progress from proxied RR.
|
int |
hashCode() |
boolean |
hasNext()
Return true if the RR- including the k,v pair stored in this object-
is exhausted.
|
int |
id()
Return the position in the collector this class occupies.
|
void |
initialize(InputSplit split,
TaskAttemptContext context)
Called once at initialization.
|
K |
key()
Return the key at the head of this RR.
|
void |
key(K qkey)
Clone the key at the head of this RR into the object supplied.
|
boolean |
nextKeyValue()
Read the next k,v pair into the head of this object; return true iff
the RR and this are exhausted.
|
void |
skip(K key)
Skip key-value pairs with keys less than or equal to the key provided.
|
protected boolean empty
protected WritableComparator cmp
protected WrappedRecordReader(int id)
public void initialize(InputSplit split, TaskAttemptContext context) throws IOException, InterruptedException
RecordReader
initialize
in class RecordReader<K extends WritableComparable<?>,U extends Writable>
split
- the split that defines the range of records to readcontext
- the information about the taskIOException
InterruptedException
public U createValue()
ComposableRecordReader
public int id()
public void key(K qkey) throws IOException
IOException
public boolean hasNext()
public void skip(K key) throws IOException, InterruptedException
IOException
InterruptedException
public void accept(org.apache.hadoop.mapreduce.lib.join.CompositeRecordReader.JoinCollector i, K key) throws IOException, InterruptedException
IOException
InterruptedException
public boolean nextKeyValue() throws IOException, InterruptedException
nextKeyValue
in class RecordReader<K extends WritableComparable<?>,U extends Writable>
IOException
InterruptedException
public K getCurrentKey() throws IOException, InterruptedException
getCurrentKey
in class RecordReader<K extends WritableComparable<?>,U extends Writable>
IOException
InterruptedException
public U getCurrentValue() throws IOException, InterruptedException
getCurrentValue
in class RecordReader<K extends WritableComparable<?>,U extends Writable>
IOException
InterruptedException
public float getProgress() throws IOException, InterruptedException
getProgress
in class RecordReader<K extends WritableComparable<?>,U extends Writable>
IOException
InterruptedException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class RecordReader<K extends WritableComparable<?>,U extends Writable>
IOException
public int compareTo(ComposableRecordReader<K,?> other)
Copyright © 2016 Apache Software Foundation. All rights reserved.