final OutputCollector<OT> output = (OutputCollector<OT>) this.output;
// as long as there is data to read
while (!this.taskCanceled && !format.reachedEnd()) {
// build next pair and ship pair if it is valid
if ((record = format.nextRecord(record)) != null) {
output.collect(record);
}
}
} else if (this.output instanceof ChainedCollectorMapDriver) {
@SuppressWarnings("unchecked")
final ChainedCollectorMapDriver<OT, ?> output = (ChainedCollectorMapDriver<OT, ?>) this.output;