code: private HiveJdbcConnector withHiveServerVersion(int hiveServerVersion) {
      try {
        if (hiveServerVersion == 1) {
          Class.forName(HIVE_JDBC_DRIVER_NAME);
        } else if (hiveServerVersion == 2) {
          Class.forName(HIVE2_JDBC_DRIVER_NAME);
        } else {
          throw new RuntimeException(hiveServerVersion + " is not a valid HiveServer version.");
        }
      } catch (ClassNotFoundException e) {
        throw new RuntimeException("Cannot find a suitable driver of HiveServer version " + hiveServerVersion + ".", e);
      }
      this.hiveServerVersion = hiveServerVersion;
      return this;
    }
docs: Set the {@link HiveJdbcConnector#hiveServerVersion}. The hiveServerVersion must be either 1 or 2.
  @param hiveServerVersion
  @return