ayushtkn commented on code in PR #6343:
URL: https://github.com/apache/hive/pull/6343#discussion_r3005862621
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPool.java:
##########
@@ -103,7 +103,13 @@ public interface SessionObjectFactory<SessionType> {
this.deltaRemaining = new AtomicInteger(initialSize);
- final int threadCount = HiveConf.getIntVar(initConf,
ConfVars.HIVE_SERVER2_TEZ_SESSION_MAX_INIT_THREADS);
+ int threadCount = 1;
+ if (!HiveConf.getBoolVar(initConf,
ConfVars.HIVE_SERVER2_TEZ_USE_EXTERNAL_SESSIONS)) {
+ // Don't use multiple threads for external sessions.
+ threadCount = Math.min(initialSize,
+ HiveConf.getIntVar(initConf,
ConfVars.HIVE_SERVER2_TEZ_SESSION_MAX_INIT_THREADS));
Review Comment:
there is a line below
```
if (initialSize == 0) return; // May be resized later.
```
which means `initialSize` can be resized, so do we need to do this
`Math.min`, moreover if it hits 0, like in the if statement, I think the TPE
would throw `IllegalArgumentException`
--
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]