reader.initialize();
}
@Override
public boolean nextKeyValue() throws IOException, InterruptedException {
StreamEvent streamEvent;
do {
if (reader.getPosition() >= inputSplit.getStart() + inputSplit.getLength()) {
return false;
}
events.clear();
if (reader.read(events, 1, 0, TimeUnit.SECONDS) <= 0) {
return false;
}
streamEvent = events.get(0);
} while (streamEvent.getTimestamp() < inputSplit.getStartTime());
if (streamEvent.getTimestamp() >= inputSplit.getEndTime()) {
return false;
}
currentEntry = decoder.decode(streamEvent, currentEntry);
return true;