@InterfaceAudience.Public @InterfaceStability.Stable public class WrappedRecordReader<K extends WritableComparable,U extends Writable> extends Object implements ComposableRecordReader<K,U>, Configurable
Modifier and Type | Method and Description |
---|---|
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.
|
Configuration |
getConf()
Return the configuration used by this object.
|
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 |
setConf(Configuration conf)
Set the configuration to be used by this object.
|
void |
skip(K key)
Skip key-value pairs with keys less than or equal to the key provided.
|
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 intoIOException
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 Closeable
close
in interface AutoCloseable
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)
public void setConf(Configuration conf)
Configurable
setConf
in interface Configurable
conf
- configuration to be usedpublic Configuration getConf()
Configurable
getConf
in interface Configurable
Copyright © 2024 Apache Software Foundation. All rights reserved.