abstractdog commented on code in PR #6343:
URL: https://github.com/apache/hive/pull/6343#discussion_r3010561635
##########
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:
the constructor, where the executor service is initialized, won't be able to
hit on initialSize==0:
```
this.initialSize = numSessionsTotal;
...
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));
}
this.executorService = MoreExecutors
```
so I would not be afraid of `initialSize == 0` and hence the TPE
this zero-check is in the `start` method, which doesn't touch thread pool
executor for session initialization, so I cannot relate to that "May be resized
later" comment at the moment
--
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]