protected void execSql(String sqlScriptFile) throws IOException {
    CommandBuilder builder =
        new CommandBuilder(conf, url, driver, userName, passWord, sqlScriptFile)
            .setVerbose(verbose);

    // run the script using SqlLine
    SqlLine sqlLine = new SqlLine();
    ByteArrayOutputStream outputForLog = null;
    if (!verbose) {
      OutputStream out;
      if (LOG.isDebugEnabled()) {
        out = outputForLog = new ByteArrayOutputStream();
      } else {
        out = new NullOutputStream();
      }
      sqlLine.setOutputStream(new PrintStream(out));
      System.setProperty("sqlline.silent", "true");
    }
    LOG.info("Going to run command <" + builder.buildToLog() + ">");
    SqlLine.Status status = sqlLine.begin(builder.buildToRun(), null, false);
    if (LOG.isDebugEnabled() && outputForLog != null) {
      LOG.debug("Received following output from Sqlline:");
      LOG.debug(outputForLog.toString("UTF-8"));
    }
    if (status != SqlLine.Status.OK) {
      throw new IOException("Schema script failed, errorcode " + status);
    }
  }
Execute a given metastore script. This default version uses sqlline to execute the files,
which requires only running one file.  Subclasses can use other executors.
@param scriptDir directory script is in
@param scriptFile file in the directory to run
@throws IOException if it cannot read the file or directory
@throws HiveMetaException default implementation never throws this
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/schematool/MetastoreSchemaTool.java