protected void beginNextTransactionImpl(String errorMessage)
      throws StreamingException{
    state = HiveStreamingConnection.TxnState.INACTIVE; //clear state from previous txn
    if ((currentTxnIndex + 1) >= txnToWriteIds.size()) {
      throw new InvalidTransactionState(errorMessage);
    }
    currentTxnIndex++;
    state = HiveStreamingConnection.TxnState.OPEN;
  }
once any operation on this batch encounters a system exception
(e.g. IOException on write) it's safest to assume that we can't write to the
file backing this batch any more.  This guards important public methods
streaming/src/java/org/apache/hive/streaming/AbstractStreamingTransaction.java