@Override
  public int run(String[] strings) throws Exception {
    processOptions(strings);
    setupParamters();
    if (httpEnabled) {
      setupHTTPServer();
    } else {
      setupServer();
    }
    return serviceUGI.doAs(new PrivilegedAction<Integer>() {
      @Override
      public Integer run() {
        try {
          startInfoServer();
          if (httpEnabled) {
            httpServer.start();
            httpServer.join();
          } else {
            tserver.serve();
          }
          return 0;
        } catch (Exception e) {
          LOG.error(HBaseMarkers.FATAL, "Cannot run ThriftServer", e);
          return -1;
        }
      }
    });
  }
Run without any command line arguments
@return exit code
@throws Exception exception
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java