Indhumathi27 commented on code in PR #5649:
URL: https://github.com/apache/hive/pull/5649#discussion_r1993430862


##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/StatsUpdater.java:
##########
@@ -91,8 +91,9 @@ public void gatherStats(CompactionInfo ci, HiveConf hiveConf,
             if (compactionQueueName != null && compactionQueueName.length() > 
0) {
                 conf.set(TezConfiguration.TEZ_QUEUE_NAME, compactionQueueName);
             }
-            SessionState sessionState = DriverUtils.setUpSessionState(conf, 
userName, true);
-            DriverUtils.runOnDriver(conf, sessionState, sb.toString());
+            try (SessionState sessionState = 
DriverUtils.setUpSessionState(conf, userName, true)) {

Review Comment:
   you are right. Actually in all this three cases, StatsUpdater, 
QueryCompactor and IcebergQueryCompactor, we are using 
DriverUtils.setUpSessionState. So, the session state can't be closed in run 
method. Can we add a shutdown hook to close session state on HS2 stop ? 
@deniskuzZ 



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to