public void close() throws StreamingException {
    if (isClosed()) {
      return;
    }
    isTxnClosed.set(true); //also ensures that heartbeat() is no-op since client is likely doing it async
    try {
      abort(true); //abort all remaining txns
    } catch (Exception ex) {
      LOG.error("Fatal error on " + toString() + "; cause " + ex.getMessage(), ex);
      throw new StreamingException("Unable to abort", ex);
    }
    try {
      closeImpl();
    } catch (Exception ex) {
      LOG.error("Fatal error on " + toString() + "; cause " + ex.getMessage(), ex);
      throw new StreamingException("Unable to close", ex);
    }
  }
Close the TransactionBatch.  This will abort any still open txns in this batch.

@throws StreamingException - failure when closing transaction batch
streaming/src/java/org/apache/hive/streaming/TransactionBatch.java