private void openConnection() {
    Metrics metrics = MetricsFactory.getInstance();
    if (metrics != null) {
      try {
        metrics.incrementCounter(MetricsConstant.OPEN_CONNECTIONS);
        metrics.incrementCounter(MetricsConstant.CUMULATIVE_CONNECTION_COUNT);
      } catch (Exception e) {
        LOG.warn("Error reporting HS2 open connection operation to Metrics system", e);
      }
    }
  }
Configure Jetty to serve http requests. Example of a client connection URL:
http://localhost:10000/servlets/thrifths2/ A gateway may cause actual target
URL to differ, e.g. http://gateway:port/hive2/servlets/thrifths2/
service/src/java/org/apache/hive/service/cli/thrift/ThriftHttpCLIService.java