protected int getNumMaxThreads(Configuration conf) {

    String threadSize = conf.get(YarnConfiguration.ROUTER_USER_CLIENT_THREADS_SIZE);

    // If the user configures YarnConfiguration.ROUTER_USER_CLIENT_THREADS_SIZE,
    // we will still get the number of threads from this configuration.
    if (StringUtils.isNotBlank(threadSize)) {
      LOG.warn("{} is a deprecated property, " +
          "please remove it, use {} to configure the maximum number of thread pool.",
          YarnConfiguration.ROUTER_USER_CLIENT_THREADS_SIZE,
          YarnConfiguration.ROUTER_USER_CLIENT_THREAD_POOL_MAXIMUM_POOL_SIZE);
      return Integer.parseInt(threadSize);
    }

    int numMaxThreads = conf.getInt(
        YarnConfiguration.ROUTER_USER_CLIENT_THREAD_POOL_MAXIMUM_POOL_SIZE,
        YarnConfiguration.DEFAULT_ROUTER_USER_CLIENT_THREAD_POOL_MAXIMUM_POOL_SIZE);
    return numMaxThreads;
  }
@Test
  public void testGetNumMaxThreads() {
    // If we don't configure YarnConfiguration.ROUTER_USER_CLIENT_THREAD_POOL_MAXIMUM_POOL_SIZE,
    // we expect to get 5 threads
    int minThreads = interceptor.getNumMaxThreads(this.getConf());
    Assert.assertEquals(5, minThreads);

    // If we configure YarnConfiguration.ROUTER_USER_CLIENT_THREAD_POOL_MAXIMUM_POOL_SIZE,
    // we expect to get 8 threads
    this.getConf().unset(YarnConfiguration.ROUTER_USER_CLIENT_THREADS_SIZE);
    this.getConf().setInt(YarnConfiguration.ROUTER_USER_CLIENT_THREAD_POOL_MAXIMUM_POOL_SIZE, 8);
    int minThreads2 = interceptor.getNumMaxThreads(this.getConf());
    Assert.assertEquals(8, minThreads2);
  }