flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vinoyang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-11874) [checkpoint] Split CheckpointStorage interface to distinguish JM and TM side
Date Tue, 12 Mar 2019 01:40:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-11874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16790121#comment-16790121

vinoyang commented on FLINK-11874:

I suggest you remove the "checkpoint" tag from the issue title. About your idea, if there
is a design proposal, it would look better and help discuss.

> [checkpoint] 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
>             Fix For: 1.9.0
> 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

View raw message