architjainjain commented on code in PR #6501:
URL: https://github.com/apache/hive/pull/6501#discussion_r3712642552


##########
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:
##########
@@ -3940,6 +4006,15 @@ public static enum ConfVars {
     HIVE_SERVER2_TEZ_QUEUE_ACCESS_CHECK("hive.server2.tez.queue.access.check", 
false,
         "Whether to check user access to explicitly specified YARN queues. " +
           "yarn.resourcemanager.webapp.address must be configured to use 
this."),
+    
HIVE_TEZ_QUEUE_METRICS_REFRESH_INTERVAL("hive.tez.queue.metrics.refresh.interval",
 "0s",
+        new TimeValidator(TimeUnit.SECONDS),
+        "Interval for refreshing YARN queue resource metrics during Tez query 
execution. " +
+        "When set to a positive value (e.g. 10s), displays real-time memory, 
vCore, capacity " +
+        "and application metrics for the YARN queue being used. " +
+        "Set to 0 or negative to disable. Minimum effective value is 1 
second."),
+    
HIVE_SERVER2_TEZ_QUEUE_METRICS_REFRESH_THREADS("hive.server2.tez.queue.metrics.refresh.threads",
 4,
+        "Number of threads in the scheduled thread pool for refreshing YARN 
queue metrics. " +
+        "This pool is used by HiveServer2 to periodically collect queue 
resource information from YARN RM. "),

Review Comment:
   Thank you for the review! 
   
   Implemented conditional initialization - the pool is now only created when 
`hive.execution.engine=tez`. 
   
   For non-Tez engines (MR, Spark, local), the pool initialization is skipped 
entirely, resulting in zero thread/memory overhead in those environments.
   
   Added comprehensive test coverage including negative test cases to verify 
the pool is NOT created for non-Tez engines.
   
   All tests passing.



-- 
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