|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.mapred.join.WrappedRecordReader<K,U>
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.
Method Summary | |
---|---|
void |
accept(org.apache.hadoop.mapred.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()
Request new value from proxied RR. |
boolean |
equals(Object other)
Return true iff compareTo(other) retn true. |
long |
getPos()
Request position from proxied RR. |
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. |
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. |
protected boolean |
next()
Read the next k,v pair into the head of this object; return true iff the RR and this are exhausted. |
boolean |
next(K key,
U value)
Write key-value pair at the head of this stream to the objects provided; get next key-value pair from proxied RR. |
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 |
Method Detail |
---|
public int id()
id
in interface ComposableRecordReader<K extends WritableComparable,U extends Writable>
public K key()
key
in interface ComposableRecordReader<K extends WritableComparable,U extends Writable>
public void key(K qkey) throws IOException
key
in interface ComposableRecordReader<K extends WritableComparable,U extends Writable>
IOException
public boolean hasNext()
hasNext
in interface ComposableRecordReader<K extends WritableComparable,U extends Writable>
public void skip(K key) throws IOException
skip
in interface ComposableRecordReader<K extends WritableComparable,U extends Writable>
IOException
protected boolean next() throws IOException
IOException
public void accept(org.apache.hadoop.mapred.join.CompositeRecordReader.JoinCollector i, K key) throws IOException
accept
in interface ComposableRecordReader<K extends WritableComparable,U extends Writable>
IOException
public boolean next(K key, U value) throws IOException
next
in interface RecordReader<K extends WritableComparable,U extends Writable>
key
- the key to read data intovalue
- the value to read data into
IOException
public K createKey()
createKey
in interface RecordReader<K extends WritableComparable,U extends Writable>
public U createValue()
createValue
in interface RecordReader<K extends WritableComparable,U extends Writable>
public float getProgress() throws IOException
getProgress
in interface RecordReader<K extends WritableComparable,U extends Writable>
0.0
to 1.0
.
IOException
public long getPos() throws IOException
getPos
in interface RecordReader<K extends WritableComparable,U extends Writable>
IOException
public void close() throws IOException
close
in interface RecordReader<K extends WritableComparable,U extends Writable>
IOException
public int compareTo(ComposableRecordReader<K,?> other)
compareTo
in interface Comparable<ComposableRecordReader<K extends WritableComparable,?>>
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 |