// committing long running tx: no need to commit datasets, as they were committed in external processes
// also no need to rollback changes if commit fails, as these changes where performed by mapreduce tasks
// NOTE: can't call afterCommit on datasets in this case: the changes were made by external processes.
if (!txClient.commit(transaction)) {
LOG.warn("MapReduce Job transaction failed to commit");
throw new TransactionFailureException("Failed to commit transaction for MapReduce " + context.toString());
}
} else {
// invalids long running tx. All writes done by MR cannot be undone at this point.
txClient.invalidate(transaction.getWritePointer());
}