_reporter.incrCounter(topic, "event-count", _count);
}
protected boolean get(KafkaETLKey key, BytesWritable value) throws IOException {
if (_messageIt != null && _messageIt.hasNext()) {
MessageAndOffset msgAndOffset = _messageIt.next();
ByteBuffer buf = msgAndOffset.message().payload();
int origSize = buf.remaining();
byte[] bytes = new byte[origSize];
buf.get(bytes, buf.position(), origSize);
value.set(bytes, 0, origSize);
key.set(_index, _offset, msgAndOffset.message().checksum());
_offset += msgAndOffset.offset(); //increase offset
_count ++; //increase count
return true;
}
else return false;