K - the key of the records from KafkaV - the value of the records from Kafkapublic class KafkaRecordReader<K,V>
extends org.apache.hadoop.mapreduce.RecordReader<K,V>
RecordReader for pulling data from Kafka.| Constructor and Description | 
|---|
| KafkaRecordReader() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | close() | 
| K | getCurrentKey() | 
| V | getCurrentValue() | 
| float | getProgress() | 
| void | initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
          org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext) | 
| boolean | nextKeyValue() | 
public void initialize(org.apache.hadoop.mapreduce.InputSplit inputSplit,
                       org.apache.hadoop.mapreduce.TaskAttemptContext taskAttemptContext)
                throws IOException,
                       InterruptedException
initialize in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOExceptionInterruptedExceptionpublic boolean nextKeyValue()
                     throws IOException,
                            InterruptedException
nextKeyValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOExceptionInterruptedExceptionpublic K getCurrentKey() throws IOException, InterruptedException
getCurrentKey in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOExceptionInterruptedExceptionpublic V getCurrentValue() throws IOException, InterruptedException
getCurrentValue in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOExceptionInterruptedExceptionpublic float getProgress()
                  throws IOException,
                         InterruptedException
getProgress in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOExceptionInterruptedExceptionpublic void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.hadoop.mapreduce.RecordReader<K,V>IOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.