Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As shown in the diagram above, the class in remote resources needs to be loaded as a catalog function in the table environment for calcite sql validation and code generation, then the path needs to be registered into the execution environment, so that it can be used in distributed runtime. The deployment model plays an important role in setting the context of where the resource is. It could be in blobstore or just a path item in the classpaths of the job graph in a different deployment model. Thus, we may first introduce the API changes required on the left side in this section, then discuss the resource shipping in different deployment models.

Public API Changes

ResourceUri

Code Block
languagejava
/** Description of function resource information. */
@PublicEvolving
public class ResourceUri {

    /** ResourceType. */
    public enum ResourceType {
        FILE,
        JAR,
        ARCHIVE
    }

    private final ResourceType resourceType;
    private final String uri;

    public ResourceUri(ResourceType resourceType, String uri) {
        this.resourceType = resourceType;
        this.uri = uri;
    }

    public ResourceType getResourceType() {
        return resourceType;
    }

    public String getUri() {
        return uri;
    }
}

CatalogFunction

This API will provide getFunctionResources method which is used to get resource information of UDF, and deprecate the isGeneric method.

...