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

ASF GitHub Bot commented on FLINK-5823:
---------------------------------------

Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5248#discussion_r160757943
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/state/CheckpointStorageLocation.java
 ---
    @@ -0,0 +1,65 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.runtime.state;
    +
    +import 
org.apache.flink.runtime.state.CheckpointStreamFactory.CheckpointStateOutputStream;
    +
    +import java.io.IOException;
    +
    +/**
    + * A storage location for one particular checkpoint. This location is 
typically
    + * created and initialized via {@link 
CheckpointStorage#initializeCheckpoint(long)} or
    + * {@link CheckpointStorage#initializeSavepoint(long, String)}.
    + */
    +public interface CheckpointStorageLocation {
    +
    +   /**
    +    * Creates the output stream to persist the checkpoint metadata to.
    +    *
    +    * @return The output stream to persist the checkpoint metadata to.
    +    * @throws IOException Thrown, if the stream cannot be opened due to an 
I/O error.
    +    */
    +   CheckpointStateOutputStream createMetadataOutputStream() throws 
IOException;
    +
    +   /**
    +    * Finalizes the checkpoint, marking the location as a finished 
checkpoint.
    +    * This method returns the external checkpoint pointer that can be used 
to resolve
    +    * the checkpoint upon recovery.
    +    *
    +    * @return The external pointer to the checkpoint at this location.
    +    * @throws IOException Thrown, if finalizing / marking as finished 
fails due to an I/O error.
    +    */
    +   String markCheckpointAsFinished() throws IOException;
    --- End diff --
    
    I have gone back and forth on this. I felt like keeping it, because we do 
need to get to some form of external pointer (a String) in the end (for ZK and 
for external resume). This couples the finalization and obtaining that pointer, 
which makes sense to me (the pointer may not be producible before 
finalization). Pushing that into the Metadata's OutputStream needs another 
interface that creates a "handle and pointer" on closing. I had that in a 
previous version, it felt much more clumsy. This variant seems nicer to me.


> Store Checkpoint Root Metadata in StateBackend (not in HA custom store)
> -----------------------------------------------------------------------
>
>                 Key: FLINK-5823
>                 URL: https://issues.apache.org/jira/browse/FLINK-5823
>             Project: Flink
>          Issue Type: Sub-task
>          Components: State Backends, Checkpointing
>            Reporter: Stephan Ewen
>            Assignee: Stephan Ewen
>            Priority: Blocker
>             Fix For: 1.5.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to