public static String extractFileFormat(String fileFormat) {
      if (fileFormat == null) {
        return "NULL";
      }
      final String lowerCaseFileFormat = fileFormat.toLowerCase();
      Optional<String> result = AVAILABLE_FORMATS.stream().filter(lowerCaseFileFormat::contains).findFirst();
      if (result.isPresent()) {
        String file = result.get();
        if (OPENCSV.equals(file)) {
          return "openCSV";
        } else if (LAZY_SIMPLE.equals(file)) {
          return TEXT;
        }
        return file;
      }
      return fileFormat;
    }
Helper method for getMetadataSummary. Extracting the format of the file from the long string.
@param fileFormat - fileFormat. A long String which indicates the type of the file.
@return String A short String which indicates the type of the file.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/tools/MetaToolObjectStore.java