static Optional<Catalog> loadCatalog(Configuration conf, String catalogName) {
    String catalogType = getCatalogType(conf, catalogName);
    if (NO_CATALOG_TYPE.equalsIgnoreCase(catalogType)) {
      return Optional.empty();
    } else {
      String name = catalogName == null ? ICEBERG_DEFAULT_CATALOG_NAME : catalogName;
      return Optional.of(CatalogUtil.buildIcebergCatalog(name,
              getCatalogProperties(conf, name, catalogType), conf));
    }
  }
Register a table with the configured catalog if it does not exist.
@param conf a Hadoop conf
@param props the controlling properties
@param metadataLocation the location of a metadata file
@return the created Iceberg table
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java