[ https://issues.apache.org/jira/browse/FLINK-11874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefan Richter resolved FLINK-11874. ------------------------------------ Resolution: Implemented Merged in: master: b6b4baf > Split CheckpointStorage interface to distinguish JM and TM side > --------------------------------------------------------------- > > Key: FLINK-11874 > URL: https://issues.apache.org/jira/browse/FLINK-11874 > Project: Flink > Issue Type: Improvement > Components: Runtime / Checkpointing > Reporter: Yun Tang > Assignee: Yun Tang > Priority: Major > Labels: pull-request-available > Fix For: 1.9.0 > > Time Spent: 20m > Remaining Estimate: 0h > > Currently, interface {{CheckpointStorage}} mixed JM and TM side, which would > be confusing for users and developers to distinguish them. > Take [FLINK-11696|https://issues.apache.org/jira/browse/FLINK-11696] as an > example, the directories should only be created once from JM side. However, > since we mixed the JM and TM side, TMs would also create directories again. > We could let interface {{CheckpointStorage}} only has two methods: > {code:java} > CheckpointStreamFactory resolveCheckpointStorageLocation( > long checkpointId, > CheckpointStorageLocationReference reference) > CheckpointStateOutputStream createTaskOwnedStateStream() > {code} > And a new interface {{ChekcpointCoordinatorStorgae}} could be introduced > extending {{CheckpointStorage}} and have methods below: > {code:java} > boolean supportsHighlyAvailableStorage() > boolean hasDefaultSavepointLocation() > CompletedCheckpointStorageLocation resolveCheckpoint(String externalPointer) > CheckpointStorageLocation initializeLocationForCheckpoint(long checkpointId) > CheckpointStorageLocation initializeLocationForSavepoint( > long checkpointId, > @Nullable String externalLocationPointer) > {code} > With this refactor, JM would only use cast {{ChekcpointCoordinatorStorgae}} > so that we could shield TMs from accidentally calling unexpected methods. -- This message was sent by Atlassian JIRA (v7.6.3#76005)