kafka.etl
Class KafkaETLRecordReader

java.lang.Object
  extended by org.apache.hadoop.mapred.SequenceFileRecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
      extended by kafka.etl.KafkaETLRecordReader
All Implemented Interfaces:
org.apache.hadoop.mapred.RecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>

public class KafkaETLRecordReader
extends org.apache.hadoop.mapred.SequenceFileRecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>


Field Summary
protected  java.lang.String _attemptId
           
protected  int _contextIndex
           
protected  java.util.List<KafkaETLContext> _contextList
           
protected  org.apache.hadoop.mapred.JobConf _job
           
protected  org.apache.hadoop.mapred.lib.MultipleOutputs _mos
           
protected  Props _props
           
protected  long _readBytes
           
protected  long _readCounts
           
protected  org.apache.hadoop.mapred.Reporter _reporter
           
protected  long _totalBytes
           
 
Fields inherited from class org.apache.hadoop.mapred.SequenceFileRecordReader
conf
 
Constructor Summary
KafkaETLRecordReader(org.apache.hadoop.mapred.InputSplit split, org.apache.hadoop.mapred.JobConf job, org.apache.hadoop.mapred.Reporter reporter)
           
 
Method Summary
 void close()
           
 KafkaETLKey createKey()
           
 org.apache.hadoop.io.BytesWritable createValue()
           
protected  KafkaETLContext getContext()
           
 float getProgress()
           
 boolean next(KafkaETLKey key, org.apache.hadoop.io.BytesWritable value)
           
 
Methods inherited from class org.apache.hadoop.mapred.SequenceFileRecordReader
getCurrentValue, getKeyClass, getPos, getValueClass, next, seek
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_props

protected Props _props

_job

protected org.apache.hadoop.mapred.JobConf _job

_reporter

protected org.apache.hadoop.mapred.Reporter _reporter

_mos

protected org.apache.hadoop.mapred.lib.MultipleOutputs _mos

_contextList

protected java.util.List<KafkaETLContext> _contextList

_contextIndex

protected int _contextIndex

_totalBytes

protected long _totalBytes

_readBytes

protected long _readBytes

_readCounts

protected long _readCounts

_attemptId

protected java.lang.String _attemptId
Constructor Detail

KafkaETLRecordReader

public KafkaETLRecordReader(org.apache.hadoop.mapred.InputSplit split,
                            org.apache.hadoop.mapred.JobConf job,
                            org.apache.hadoop.mapred.Reporter reporter)
                     throws java.io.IOException
Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface org.apache.hadoop.mapred.RecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Overrides:
close in class org.apache.hadoop.mapred.SequenceFileRecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Throws:
java.io.IOException

createKey

public KafkaETLKey createKey()
Specified by:
createKey in interface org.apache.hadoop.mapred.RecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Overrides:
createKey in class org.apache.hadoop.mapred.SequenceFileRecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>

createValue

public org.apache.hadoop.io.BytesWritable createValue()
Specified by:
createValue in interface org.apache.hadoop.mapred.RecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Overrides:
createValue in class org.apache.hadoop.mapred.SequenceFileRecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>

getProgress

public float getProgress()
                  throws java.io.IOException
Specified by:
getProgress in interface org.apache.hadoop.mapred.RecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Overrides:
getProgress in class org.apache.hadoop.mapred.SequenceFileRecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Throws:
java.io.IOException

next

public boolean next(KafkaETLKey key,
                    org.apache.hadoop.io.BytesWritable value)
             throws java.io.IOException
Specified by:
next in interface org.apache.hadoop.mapred.RecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Overrides:
next in class org.apache.hadoop.mapred.SequenceFileRecordReader<KafkaETLKey,org.apache.hadoop.io.BytesWritable>
Throws:
java.io.IOException

getContext

protected KafkaETLContext getContext()
                              throws java.io.IOException
Throws:
java.io.IOException