这个可能跟配置和资源(内存等)有关系。比如你的并发数是如何配置的。配置异步线程池的线程数
[mw_shl_code=bash,true]<property>
<name>hive.server2.async.exec.threads</name>
<value>100</value>
<description>Number of threads in the async thread pool for HiveServer2</description>
</property>
[/mw_shl_code]
配置异步线程结束的超时时间(超过这个时间HS会退出):
[mw_shl_code=bash,true]<property>
<name>hive.server2.async.exec.shutdown.timeout</name>
<value>10</value>
<description>Time (in seconds) for which HiveServer2 shutdown will wait for async
threads to terminate</description>
</property>[/mw_shl_code]
配置异步线程的等待超时时间(超过这个值线程会被回收)
[mw_shl_code=bash,true]<property>
<name>hive.server2.async.exec.keepalive.time</name>
<value>10</value>
<description>Time (in seconds) that an idle HiveServer2 async thread (from the thread pool) will wait
for a new task to arrive before terminating</description>
</property>[/mw_shl_code]
更多相关配置:
[mw_shl_code=bash,true]对应在http协议下线程池的线程数
<property>
<name>hive.server2.thrift.http.min.worker.threads</name>
<value>5</value>
<description>Minimum number of worker threads when in HTTP mode.</description>
</property>
<property>
<name>hive.server2.thrift.http.max.worker.threads</name>
<value>500</value>
<description>Maximum number of worker threads when in HTTP mode.</description>
</property>
对应在tcp协议下的线程池的线程数:
<property>
<name>hive.server2.thrift.min.worker.threads</name>
<value>5</value>
<description>Minimum number of worker threads when in TCP mode.</description>
</property>
<property>
<name>hive.server2.thrift.max.worker.threads</name>
<value>500</value>
<description>Maximum number of worker threads when in TCP mode.</description>
</property>[/mw_shl_code]
|