Package org.apache.hadoop.mapred.join
Interface ComposableRecordReader<K extends WritableComparable,V extends Writable>
- All Superinterfaces:
AutoCloseable,Closeable,Comparable<ComposableRecordReader<K,,?>> RecordReader<K,V>
- All Known Implementing Classes:
InnerJoinRecordReader,JoinRecordReader,MultiFilterRecordReader,OuterJoinRecordReader,OverrideRecordReader,WrappedRecordReader
@Public
@Stable
public interface ComposableRecordReader<K extends WritableComparable,V extends Writable>
extends RecordReader<K,V>, Comparable<ComposableRecordReader<K,?>>
Additional operations required of a RecordReader to participate in a join.
-
Method Summary
Modifier and TypeMethodDescriptionvoidWhile key-value pairs from this RecordReader match the given key, register them with the JoinCollector provided.booleanhasNext()Returns true if the stream is not empty, but provides no guarantee that a call to next(K,V) will succeed.intid()Return the position in the collector this class occupies.key()Return the key this RecordReader would supply on a call to next(K,V)voidClone the key at the head of this RecordReader into the object provided.voidSkip key-value pairs with keys less than or equal to the key provided.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.apache.hadoop.mapred.RecordReader
close, createKey, createValue, getPos, getProgress, next
-
Method Details
-
id
int id()Return the position in the collector this class occupies. -
key
K key()Return the key this RecordReader would supply on a call to next(K,V) -
key
Clone the key at the head of this RecordReader into the object provided.- Throws:
IOException
-
hasNext
boolean hasNext()Returns true if the stream is not empty, but provides no guarantee that a call to next(K,V) will succeed. -
skip
Skip key-value pairs with keys less than or equal to the key provided.- Throws:
IOException
-
accept
void accept(org.apache.hadoop.mapred.join.CompositeRecordReader.JoinCollector jc, K key) throws IOException While key-value pairs from this RecordReader match the given key, register them with the JoinCollector provided.- Throws:
IOException
-