|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapreduce.RecordReader<K,V> org.apache.hadoop.mapreduce.lib.join.ComposableRecordReader<K,U> org.apache.hadoop.mapreduce.lib.join.WrappedRecordReader<K,U>
@InterfaceAudience.Public @InterfaceStability.Stable public class WrappedRecordReader<K extends WritableComparable<?>,U extends Writable>
Proxy class for a RecordReader participating in the join framework. This class keeps track of the "head" key-value pair for the provided RecordReader and keeps a store of values matching a key when this source is participating in a join.
Field Summary | |
---|---|
protected WritableComparator |
cmp
|
protected boolean |
empty
|
Constructor Summary | |
---|---|
protected |
WrappedRecordReader(int id)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean empty
protected WritableComparator cmp
Constructor Detail |
---|
protected WrappedRecordReader(int id)
Method Detail |
---|
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 task
IOException
InterruptedException
public K createKey()
public U createValue()
ComposableRecordReader
public int id()
public K key()
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 class RecordReader<K extends WritableComparable<?>,U extends Writable>
IOException
public int compareTo(ComposableRecordReader<K,?> other)
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |