@Override
  public synchronized void stop() {
    if (isStarted && !isEmbedded) {
      if (serverThread != null) {
        serverThread.interrupt();
        serverThread = null;
      }
      stopServer();
      isStarted = false;
    }
    super.stop();
  }
Return the number of Hive sessions this context has handled. It is
technically possible that a single connection context could handle an
unbounded number of sequential Hive sessions, though it is currently not
implemented.

@return The number of sessions this thrift context has handled
service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java