deniskuzZ commented on code in PR #4805:
URL: https://github.com/apache/hive/pull/4805#discussion_r1410588213


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -5811,11 +5811,11 @@ public void performTimeOuts() {
         s = sqlGenerator.addLimitClause(10 * TIMED_OUT_TXN_ABORT_BATCH_SIZE, 
s);
 
         LOG.debug("Going to execute query <{}>", s);
-        List<List<Long>> timedOutTxns = 
jdbcResource.getJdbcTemplate().query(s, rs -> {
-          List<List<Long>> txnbatch = new ArrayList<>();
-          List<Long> currentBatch = new 
ArrayList<>(TIMED_OUT_TXN_ABORT_BATCH_SIZE);
+        List<List<Pair<Long, Integer>>> timedOutTxns = 
jdbcResource.getJdbcTemplate().query(s, rs -> {
+          List<List<Pair<Long, Integer>>> txnbatch = new ArrayList<>();
+          List<Pair<Long, Integer>> currentBatch = new 
ArrayList<>(TIMED_OUT_TXN_ABORT_BATCH_SIZE);
           while (rs.next()) {
-            currentBatch.add(rs.getLong(1));
+            currentBatch.add(Pair.of(rs.getLong(1),rs.getInt(2)));

Review Comment:
   sorry, looks like Map<Long, TxnType> was a valid choice, so you can easily 
access jus the ids
   ````
   currentBatch.put(Pair.of(rs.getLong(1), TxnType.findByValue(rs.getInt(2))); 
   ````



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to