@Override
  public void initThriftServiceThread() throws IllegalAccessException {
    IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
    try {
      if (config.isEnableSSL()) {
        thriftServiceThread =
            new ThriftServiceThread(
                processor,
                getID().getName(),
                ThreadName.CLIENT_RPC_PROCESSOR.getName(),
                config.getRpcAddress(),
                config.getRpcPort(),
                config.getRpcMaxConcurrentClientNum(),
                config.getThriftServerAwaitTimeForStopService(),
                new RPCServiceThriftHandler(impl),
                IoTDBDescriptor.getInstance().getConfig().isRpcThriftCompressionEnable(),
                config.getKeyStorePath(),
                config.getKeyStorePwd(),
                config.getConnectionTimeoutInMS(),
                ZeroCopyRpcTransportFactory.INSTANCE);
      } else {
        thriftServiceThread =
            new ThriftServiceThread(
                processor,
                getID().getName(),
                ThreadName.CLIENT_RPC_PROCESSOR.getName(),
                config.getRpcAddress(),
                config.getRpcPort(),
                config.getRpcMaxConcurrentClientNum(),
                config.getThriftServerAwaitTimeForStopService(),
                new RPCServiceThriftHandler(impl),
                IoTDBDescriptor.getInstance().getConfig().isRpcThriftCompressionEnable(),
                ZeroCopyRpcTransportFactory.INSTANCE);
      }
    } catch (RPCServiceException e) {
      throw new IllegalAccessException(e.getMessage());
    }
    thriftServiceThread.setName(ThreadName.CLIENT_RPC_SERVICE.getName());
    MetricService.getInstance().addMetricSet(new RPCServiceMetrics(thriftServiceThread));
  }
A service to handle RPC request from client.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/service/ExternalRPCService.java