assert (batchId != null && batchId.equals(batch.getId()));
assert (jobUtil.getJobId().equals(batch.getJobId()));
assert clientBatchInfo.numRows > 0;
final int recordsProcessed = batch.getNumberRecordsProcessed();
final BatchStateEnum state = batch.getState();
// TODO: can we have a failed batch with recordsProcessed>0 ? I believe we can, but how?
if ((state == BatchStateEnum.Completed || recordsProcessed > 0) && recordsProcessed != clientBatchInfo.numRows)
sanityCheckError(batchId, "Expected " + clientBatchInfo.numRows
+ " to be processed for batch but got results for " + recordsProcessed);
if (state != BatchStateEnum.Completed && state != BatchStateEnum.Failed)