@Override
  protected void printUsageAndExit(Options options, int exitCode) throws Shell.ExitCodeException {
    HelpFormatter formatter = new HelpFormatter();
    formatter.printHelp("Thrift", null, options,
      "To start the Thrift server run 'hbase-daemon.sh start thrift2' or " + "'hbase thrift2'\n"
        + "To shutdown the thrift server run 'hbase-daemon.sh stop thrift2' or"
        + " send a kill signal to the thrift server pid",
      true);
    throw new Shell.ExitCodeException(exitCode, "");
  }
ThriftServer - this class starts up a Thrift server which implements the HBase API specified in
the HbaseClient.thrift IDL file.
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftServer.java