code: public static Format fromString(String formatName) {
      if (formatName.equals("avro")) {
        return AVRO;
      } else if (formatName.equals("parquet")) {
        return PARQUET;
      } else if (formatName.equals("json")) {
        return JSON;
      } else if (formatName.equals("csv")) {
        return CSV;
      } else if (formatName.equals("inputformat")) {
        return INPUTFORMAT;
      } else {
        throw new IllegalArgumentException("Unknown format type: " + formatName);
      }
    }
docs: Return a {@link Format} for the format name specified. If {@code formatName}
  is not a valid name, an IllegalArgumentException is thrown. Currently the
  formats <q>avro</q>, <q>csv</q>, and <q>parquet</q> are supported. Format names are
  case sensitive.
  
  @since 0.9.0
  @return an appropriate instance of Format
  @throws IllegalArgumentException if {@code formatName} is not a valid format.