OpenTxnsResponse openTxnsResponse = txnHandler.openTxns(new OpenTxnRequest(3, "me", "localhost")); AcidOpenTxnsCounterService openTxnsCounterService = new AcidOpenTxnsCounterService(); openTxnsCounterService.setConf(hiveConf); openTxnsCounterService.run(); // will update current number of open txns to 3 txnHandler.commitTxn(new CommitTxnRequest(txnid)); openTxnsCounterService.run(); // will update current number of open txns back to 0 exception = null; try {