} else {
prevCached = new HashMap<Integer, Object>();
}
for (int i = _index; i < partitions; i += _numTasks) {
RotatingTransactionalState state = _partitionStates.get(i);
if (state == null) {
state = new RotatingTransactionalState(_state, "" + i);
_partitionStates.put(i, state);
}
state.removeState(tx.getTransactionId());
Object lastMeta = prevCached.get(i);
if (lastMeta == null)
lastMeta = state.getLastState();
Object meta = _emitter.emitPartitionBatch(tx, collector, i,
lastMeta);
metas.put(i, meta);
}
}