...
Transactions in a TransactionBatch are eventually expired by the Metastore if not committed or aborted after hive.txn.timeout secs. TrasnactionBatch class provides a heartbeat() method to prolong the lifetime of unused transactions in the batch.
Note: Hive 1.3 onwards, invoking TxnBatch.close() will cause all unused transaction in the current TxnBatch to be aborted.
Notes about the HiveConf Object
...