[
https://issues.apache.org/jira/browse/FLINK-5823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16320588#comment-16320588
]
ASF GitHub Bot commented on FLINK-5823:
---------------------------------------
Github user StefanRRichter commented on a diff in the pull request:
https://github.com/apache/flink/pull/5248#discussion_r160719709
--- 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 --
As discussed, you might reconsider if this method is really needed.
> 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)