@Override
      public void run() {
        try {
          if (history != null) {
            history.setMaxSize(getOpts().getMaxHistoryRows());
            history.flush();
          }
        } catch (IOException e) {
          error(e);
        } finally {
          close();
        }
      }
Starts the program with redirected input. For redirected output,
setOutputStream() and setErrorStream can be used.
Exits with 0 on success, 1 on invalid arguments, and 2 on any other error

@param args
         same as main()

@param inputStream
         redirected input, or null to use standard input
beeline/src/java/org/apache/hive/beeline/BeeLine.java