architjainjain commented on code in PR #6501:
URL: https://github.com/apache/hive/pull/6501#discussion_r3729734071
##########
service/src/java/org/apache/hive/service/server/HiveServer2.java:
##########
@@ -966,6 +971,66 @@ private void initAndStartWorkloadManager(final
WMFullResourcePlan resourcePlan)
}
}
+ /**
+ * Initializes the shared JVM-wide queue metrics refresh pool.
+ * <p>
+ * This pool provides background threads for periodic YARN queue metrics
collection across
+ * all Tez sessions. The pool is shared by all queries in this HiveServer2
process to prevent
+ * thread explosion when many queries run concurrently.
+ * <p>
+ * Thread count is configured via {@code
hive.server2.tez.queue.metrics.refresh.threads}.
+ * <p>
+ * The pool is only initialized when execution engine is "tez". Whether to
actually collect
+ * queue metrics is controlled per-session by {@code
hive.tez.queue.metrics.refresh.interval},
+ * which is checked when creating metrics collectors for each query.
+ * <p>
+ * In non-Tez environments (MR, Spark, local), the pool is not created,
avoiding unnecessary
Review Comment:
@abstractdog
--
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]