This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch disable_mqtt_server
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/disable_mqtt_server by this
push:
new 131bc24 use customized tthreadpoolserver to print more info
131bc24 is described below
commit 131bc247427f3afd17aa2709f04f53834d181644
Author: xiangdong huang <[email protected]>
AuthorDate: Thu Apr 16 12:02:57 2020 +0800
use customized tthreadpoolserver to print more info
---
.../org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java | 6 +++---
server/src/main/java/org/apache/iotdb/db/service/RPCService.java | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java
b/server/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java
index a5bd99e..991bd63 100644
---
a/server/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java
+++
b/server/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java
@@ -23,7 +23,7 @@ import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
-import org.apache.thrift.server.TThreadPoolServer.Args;
+import org.apache.thrift.server.CustomizedTThreadPoolServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -121,7 +121,7 @@ public class IoTDBThreadPoolFactory {
/**
* function for creating thrift rpc client thread pool.
*/
- public static ExecutorService createThriftRpcClientThreadPool(Args args,
String poolName) {
+ public static ExecutorService
createThriftRpcClientThreadPool(CustomizedTThreadPoolServer.Args args, String
poolName) {
SynchronousQueue<Runnable> executorQueue = new SynchronousQueue<>();
return new ThreadPoolExecutor(args.minWorkerThreads,
args.maxWorkerThreads, args.stopTimeoutVal,
args.stopTimeoutUnit, executorQueue, new IoTThreadFactory(poolName));
@@ -130,7 +130,7 @@ public class IoTDBThreadPoolFactory {
/**
* function for creating thrift rpc client thread pool.
*/
- public static ExecutorService createThriftRpcClientThreadPool(Args args,
String poolName,
+ public static ExecutorService
createThriftRpcClientThreadPool(CustomizedTThreadPoolServer.Args args, String
poolName,
Thread.UncaughtExceptionHandler handler) {
SynchronousQueue<Runnable> executorQueue = new SynchronousQueue<>();
return new ThreadPoolExecutor(args.minWorkerThreads,
args.maxWorkerThreads, args.stopTimeoutVal,
diff --git a/server/src/main/java/org/apache/iotdb/db/service/RPCService.java
b/server/src/main/java/org/apache/iotdb/db/service/RPCService.java
index 1782cf9..89bfa33 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/RPCService.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/RPCService.java
@@ -32,9 +32,9 @@ import
org.apache.iotdb.service.rpc.thrift.TSIService.Processor;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TCompactProtocol;
import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.server.CustomizedTThreadPoolServer;
import org.apache.thrift.server.TServer;
-import org.apache.thrift.server.TThreadPoolServer;
-import org.apache.thrift.server.TThreadPoolServer.Args;
+import org.apache.thrift.server.CustomizedTThreadPoolServer.Args;
import org.apache.thrift.transport.TServerSocket;
import org.apache.thrift.transport.TTransportException;
import org.slf4j.Logger;
@@ -54,7 +54,7 @@ public class RPCService implements RPCServiceMBean, IService {
private Thread rpcServiceThread;
private TProtocolFactory protocolFactory;
private Processor<TSIService.Iface> processor;
- private TThreadPoolServer.Args poolArgs;
+ private CustomizedTThreadPoolServer.Args poolArgs;
private TSServiceImpl impl;
private CountDownLatch startLatch;
private CountDownLatch stopLatch;
@@ -214,7 +214,7 @@ public class RPCService implements RPCServiceMBean,
IService {
ThreadName.RPC_CLIENT.getName());
poolArgs.processor(processor);
poolArgs.protocolFactory(protocolFactory);
- poolServer = new TThreadPoolServer(poolArgs);
+ poolServer = new CustomizedTThreadPoolServer(poolArgs);
poolServer.setServerEventHandler(new RPCServiceEventHandler(impl,
threadStartLatch));
poolServer.serve();
} catch (TTransportException e) {