public static Table registerTable(Configuration conf, Properties props, String metadataLocation) {
    Schema schema = schema(props);
    PartitionSpec spec = spec(props, schema);
    Map<String, String> map = filterIcebergTableProperties(props);
    String location = props.getProperty(LOCATION);
    String catalogName = props.getProperty(InputFormatConfig.CATALOG_NAME);

    Optional<Catalog> catalog = loadCatalog(conf, catalogName);
    if (catalog.isPresent()) {
      String name = props.getProperty(NAME);
      Preconditions.checkNotNull(name, "Table identifier not set");
      return catalog.get().registerTable(TableIdentifier.parse(name), metadataLocation);
    }
    Preconditions.checkNotNull(location, "Table location not set");
    SortOrder sortOrder = getSortOrder(props, schema);
    return new HadoopTables(conf).create(schema, spec, sortOrder, map, location);
  }
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