Versions Compared

Key

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

...

Discussion thread

https://lists.apache.org/thread/c1gnn3bvbfs8v1trlf975t327s4rsffs

Vote threadhttps://lists.apache.org/thread/woj27nsmx5xd7p87ryfo8h6gx37n3wlx
JIRA

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyFLINK-35187

Release

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

RefreshHandler

We introduce the class interface RefreshHandler which records the meta information of the current materialized table background refresh job.

Code Block
languagejava
/**
 * This interface represents the meta information of current materialized table background refresh
 * pipeline. The refresh mode maybe continuous or full. The format of , the meta information in the
 * two modes is not
 * consistent, so user need to implementation this interface according to business scenario.
 *
 * <p>This<p>In metacontinuous informationmode, willthe bemeta serializedinformation tomaybe bytescontains by {@link RefreshHandlerSerializer}, then{ "clusterType": "yarn", "clusterId":
 * store to Catalog for suspend or drop {@link CatalogMaterializedTable}."xxx", "jobId": "yyyy" }.
 *
 * <p>In continuousfull mode, the format of the meta information maybe { "clusterType": "yarn",
 * "clusterId": "xxx", "jobId": "yyyy" }.
 *
 * <p>In full mode, the meta information format maybe contains { "endpoint": "xxx", "workflowId": "yyy" }.
 * Due to youuser may use different workflow scheduler plugin in this mode, youuser should implement this
 * interface according to yourtheir plugin.
 */
@PublicEvolving
public
 * <p>This interface RefreshHandlerwill {

be serialized to bytes /** by {@link RefreshHandlerSerializer}, then store to
 * Catalog for further operation.
 */ 
@PublicEvolving
public interface RefreshHandler {

    /** Returns a string that summarizes this refresh handler meta information for printing to a console or log. */
    String asSummaryString();
}

RefreshHandlerSerializer

Introduce the interface RefreshHandlerSerializer which is used to serialize and deserialize RefreshHandler. The serialized bytes will be persisted to CatalogMaterializedTable for further operation.

Code Block
languagejava
/** This interface is used to serialize and deserialize the {@link RefreshHandler}. */
@PublicEvolving
public interface RefreshHandlerSerializer<T extends RefreshHandler> {

    /** Serialize the {@link RefreshHandler} to bytes. */
    byte[] serialize(T refreshHandler) throws IOException;

    /** Deserialize the bytes to a {@link RefreshHandler} instance. */
    T deserialize(byte[] serializedBytes, ClassLoader cl)
            throws IOException, ClassNotFoundException;
}

ResolvedCatalogMaterializedTable

...