You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/01/21 12:47:33 UTC

[GitHub] [flink] dawidwys opened a new pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

dawidwys opened a new pull request #14719:
URL: https://github.com/apache/flink/pull/14719


   ## What is the purpose of the change
   
   1. The refactoring simplifies the snapshot strategy hierarchy a bit.
   
   2. It extracts the synchronous/asynchronous execution out of the SnapshotStrategy to a separate SnapshotStrategyRunner. Prior to those changes the logic was duplicated in most of the strategies.
   
   3. It introduces the concept of SnapshotResources for the synchronous part which can be later on used for introducing a common SavepointSnapshotResources.
   
   
   ## Verifying this change
   
   This change is already covered by existing state backend tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / **JavaDocs** / not documented)
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 452bc93ad4bb9c0085b57990b413d442453f66ca Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 13958f5caee468adbdb527dde26c82654812d7ac Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340) 
   * 452bc93ad4bb9c0085b57990b413d442453f66ca UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     }, {
       "hash" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376) 
   * 86bea6e122e1b358ad42ce7849e0cfe99572ed7c UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] aljoscha commented on a change in pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
aljoscha commented on a change in pull request #14719:
URL: https://github.com/apache/flink/pull/14719#discussion_r563860681



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/SnapshotStrategyRunner.java
##########
@@ -0,0 +1,132 @@
+/*
+ * 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.core.fs.CloseableRegistry;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * A class to execute a {@link SnapshotStrategy}. It can execute a strategy either synchronously or
+ * asynchronously. It takes care of common logging and resource cleaning.
+ *
+ * @param <T> type of the snapshot result.
+ */
+public final class SnapshotStrategyRunner<T extends StateObject, SR extends SnapshotResources> {
+    /** Flag to tell how the strategy should be executed. */
+    public enum ExecutionType {
+        SYNCHRONOUS,
+        ASYNCHRONOUS
+    }
+
+    private static final Logger LOG = LoggerFactory.getLogger(SnapshotStrategyRunner.class);
+
+    private static final String LOG_SYNC_COMPLETED_TEMPLATE =
+            "{} ({}, synchronous part) in thread {} took {} ms.";
+    private static final String LOG_ASYNC_COMPLETED_TEMPLATE =
+            "{} ({}, asynchronous part) in thread {} took {} ms.";
+
+    /**
+     * Descriptive name of the snapshot strategy that will appear in the log outputs and {@link
+     * #toString()}.
+     */
+    @Nonnull private final String description;
+
+    @Nonnull private final SnapshotStrategy<T, SR> snapshotStrategy;
+    @Nonnull private final CloseableRegistry cancelStreamRegistry;
+
+    @Nonnull private final ExecutionType executionType;
+
+    public SnapshotStrategyRunner(
+            @Nonnull String description,
+            @Nonnull SnapshotStrategy<T, SR> snapshotStrategy,
+            @Nonnull CloseableRegistry cancelStreamRegistry,
+            @Nonnull ExecutionType executionType) {
+        this.description = description;
+        this.snapshotStrategy = snapshotStrategy;
+        this.cancelStreamRegistry = cancelStreamRegistry;
+        this.executionType = executionType;
+    }
+
+    @Nonnull
+    public final RunnableFuture<SnapshotResult<T>> snapshot(
+            long checkpointId,
+            long timestamp,
+            @Nonnull CheckpointStreamFactory streamFactory,
+            @Nonnull CheckpointOptions checkpointOptions)
+            throws Exception {
+        long startTime = System.currentTimeMillis();
+        SR snapshotResources = snapshotStrategy.syncPrepareResources(checkpointId);
+        logCompletedInternal(LOG_SYNC_COMPLETED_TEMPLATE, streamFactory, startTime);
+        SnapshotStrategy.SnapshotResultSupplier<T> asyncSnapshot =
+                snapshotStrategy.asyncSnapshot(
+                        snapshotResources,
+                        checkpointId,
+                        timestamp,
+                        streamFactory,
+                        checkpointOptions);
+
+        switch (executionType) {
+            case SYNCHRONOUS:
+                return DoneFuture.of(asyncSnapshot.get(cancelStreamRegistry));

Review comment:
       Is this using the same registry as before? (Say in the `HeapSnapshotStrategy`)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 452bc93ad4bb9c0085b57990b413d442453f66ca Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342) 
   * 9b091e36ae668129b9f23765ab233a411c6cd1aa UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     }, {
       "hash" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379",
       "triggerID" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386",
       "triggerID" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "triggerType" : "PUSH"
     }, {
       "hash" : "589607a9653384d83bdcd2292c893b2241f2b2c1",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12481",
       "triggerID" : "589607a9653384d83bdcd2292c893b2241f2b2c1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386) 
   * 589607a9653384d83bdcd2292c893b2241f2b2c1 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12481) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] aljoscha commented on a change in pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
aljoscha commented on a change in pull request #14719:
URL: https://github.com/apache/flink/pull/14719#discussion_r563860681



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/SnapshotStrategyRunner.java
##########
@@ -0,0 +1,132 @@
+/*
+ * 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.core.fs.CloseableRegistry;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * A class to execute a {@link SnapshotStrategy}. It can execute a strategy either synchronously or
+ * asynchronously. It takes care of common logging and resource cleaning.
+ *
+ * @param <T> type of the snapshot result.
+ */
+public final class SnapshotStrategyRunner<T extends StateObject, SR extends SnapshotResources> {
+    /** Flag to tell how the strategy should be executed. */
+    public enum ExecutionType {
+        SYNCHRONOUS,
+        ASYNCHRONOUS
+    }
+
+    private static final Logger LOG = LoggerFactory.getLogger(SnapshotStrategyRunner.class);
+
+    private static final String LOG_SYNC_COMPLETED_TEMPLATE =
+            "{} ({}, synchronous part) in thread {} took {} ms.";
+    private static final String LOG_ASYNC_COMPLETED_TEMPLATE =
+            "{} ({}, asynchronous part) in thread {} took {} ms.";
+
+    /**
+     * Descriptive name of the snapshot strategy that will appear in the log outputs and {@link
+     * #toString()}.
+     */
+    @Nonnull private final String description;
+
+    @Nonnull private final SnapshotStrategy<T, SR> snapshotStrategy;
+    @Nonnull private final CloseableRegistry cancelStreamRegistry;
+
+    @Nonnull private final ExecutionType executionType;
+
+    public SnapshotStrategyRunner(
+            @Nonnull String description,
+            @Nonnull SnapshotStrategy<T, SR> snapshotStrategy,
+            @Nonnull CloseableRegistry cancelStreamRegistry,
+            @Nonnull ExecutionType executionType) {
+        this.description = description;
+        this.snapshotStrategy = snapshotStrategy;
+        this.cancelStreamRegistry = cancelStreamRegistry;
+        this.executionType = executionType;
+    }
+
+    @Nonnull
+    public final RunnableFuture<SnapshotResult<T>> snapshot(
+            long checkpointId,
+            long timestamp,
+            @Nonnull CheckpointStreamFactory streamFactory,
+            @Nonnull CheckpointOptions checkpointOptions)
+            throws Exception {
+        long startTime = System.currentTimeMillis();
+        SR snapshotResources = snapshotStrategy.syncPrepareResources(checkpointId);
+        logCompletedInternal(LOG_SYNC_COMPLETED_TEMPLATE, streamFactory, startTime);
+        SnapshotStrategy.SnapshotResultSupplier<T> asyncSnapshot =
+                snapshotStrategy.asyncSnapshot(
+                        snapshotResources,
+                        checkpointId,
+                        timestamp,
+                        streamFactory,
+                        checkpointOptions);
+
+        switch (executionType) {
+            case SYNCHRONOUS:
+                return DoneFuture.of(asyncSnapshot.get(cancelStreamRegistry));

Review comment:
       Is this using the same registry as before? (Say in the `HeapSnapshotStrategy`)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764621386


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 589607a9653384d83bdcd2292c893b2241f2b2c1 (Fri May 28 08:06:34 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9a6345ae454ff88f86890f33d8521232528cd562 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * e30fd158cf8f882fb9889e9668911575d5af18ab Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355) 
   * 59019b822a535cd01e0e8e6812f57ee36d6ea918 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 452bc93ad4bb9c0085b57990b413d442453f66ca Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342) 
   * 9b091e36ae668129b9f23765ab233a411c6cd1aa Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353) 
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * e30fd158cf8f882fb9889e9668911575d5af18ab UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764621386






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 452bc93ad4bb9c0085b57990b413d442453f66ca Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342) 
   * 9b091e36ae668129b9f23765ab233a411c6cd1aa Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353) 
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on a change in pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #14719:
URL: https://github.com/apache/flink/pull/14719#discussion_r563884695



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/SnapshotStrategyRunner.java
##########
@@ -0,0 +1,132 @@
+/*
+ * 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.core.fs.CloseableRegistry;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * A class to execute a {@link SnapshotStrategy}. It can execute a strategy either synchronously or
+ * asynchronously. It takes care of common logging and resource cleaning.
+ *
+ * @param <T> type of the snapshot result.
+ */
+public final class SnapshotStrategyRunner<T extends StateObject, SR extends SnapshotResources> {
+    /** Flag to tell how the strategy should be executed. */
+    public enum ExecutionType {
+        SYNCHRONOUS,
+        ASYNCHRONOUS
+    }
+
+    private static final Logger LOG = LoggerFactory.getLogger(SnapshotStrategyRunner.class);
+
+    private static final String LOG_SYNC_COMPLETED_TEMPLATE =
+            "{} ({}, synchronous part) in thread {} took {} ms.";
+    private static final String LOG_ASYNC_COMPLETED_TEMPLATE =
+            "{} ({}, asynchronous part) in thread {} took {} ms.";
+
+    /**
+     * Descriptive name of the snapshot strategy that will appear in the log outputs and {@link
+     * #toString()}.
+     */
+    @Nonnull private final String description;
+
+    @Nonnull private final SnapshotStrategy<T, SR> snapshotStrategy;
+    @Nonnull private final CloseableRegistry cancelStreamRegistry;
+
+    @Nonnull private final ExecutionType executionType;
+
+    public SnapshotStrategyRunner(
+            @Nonnull String description,
+            @Nonnull SnapshotStrategy<T, SR> snapshotStrategy,
+            @Nonnull CloseableRegistry cancelStreamRegistry,
+            @Nonnull ExecutionType executionType) {
+        this.description = description;
+        this.snapshotStrategy = snapshotStrategy;
+        this.cancelStreamRegistry = cancelStreamRegistry;
+        this.executionType = executionType;
+    }
+
+    @Nonnull
+    public final RunnableFuture<SnapshotResult<T>> snapshot(
+            long checkpointId,
+            long timestamp,
+            @Nonnull CheckpointStreamFactory streamFactory,
+            @Nonnull CheckpointOptions checkpointOptions)
+            throws Exception {
+        long startTime = System.currentTimeMillis();
+        SR snapshotResources = snapshotStrategy.syncPrepareResources(checkpointId);
+        logCompletedInternal(LOG_SYNC_COMPLETED_TEMPLATE, streamFactory, startTime);
+        SnapshotStrategy.SnapshotResultSupplier<T> asyncSnapshot =
+                snapshotStrategy.asyncSnapshot(
+                        snapshotResources,
+                        checkpointId,
+                        timestamp,
+                        streamFactory,
+                        checkpointOptions);
+
+        switch (executionType) {
+            case SYNCHRONOUS:
+                return DoneFuture.of(asyncSnapshot.get(cancelStreamRegistry));

Review comment:
       Good catch. I think this is actually a bug, as it is using a different one. With this registry the main checkpointing thread(from which the `snapshot` method is executed) might not get cancelled before shutting down the io streams.
   
   I will rewrite the code to always go through the `AsyncSnapshotTask`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys closed pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
dawidwys closed pull request #14719:
URL: https://github.com/apache/flink/pull/14719


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9a6345ae454ff88f86890f33d8521232528cd562 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9b091e36ae668129b9f23765ab233a411c6cd1aa Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353) 
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * e30fd158cf8f882fb9889e9668911575d5af18ab Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] dawidwys commented on a change in pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
dawidwys commented on a change in pull request #14719:
URL: https://github.com/apache/flink/pull/14719#discussion_r563884695



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/SnapshotStrategyRunner.java
##########
@@ -0,0 +1,132 @@
+/*
+ * 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.core.fs.CloseableRegistry;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * A class to execute a {@link SnapshotStrategy}. It can execute a strategy either synchronously or
+ * asynchronously. It takes care of common logging and resource cleaning.
+ *
+ * @param <T> type of the snapshot result.
+ */
+public final class SnapshotStrategyRunner<T extends StateObject, SR extends SnapshotResources> {
+    /** Flag to tell how the strategy should be executed. */
+    public enum ExecutionType {
+        SYNCHRONOUS,
+        ASYNCHRONOUS
+    }
+
+    private static final Logger LOG = LoggerFactory.getLogger(SnapshotStrategyRunner.class);
+
+    private static final String LOG_SYNC_COMPLETED_TEMPLATE =
+            "{} ({}, synchronous part) in thread {} took {} ms.";
+    private static final String LOG_ASYNC_COMPLETED_TEMPLATE =
+            "{} ({}, asynchronous part) in thread {} took {} ms.";
+
+    /**
+     * Descriptive name of the snapshot strategy that will appear in the log outputs and {@link
+     * #toString()}.
+     */
+    @Nonnull private final String description;
+
+    @Nonnull private final SnapshotStrategy<T, SR> snapshotStrategy;
+    @Nonnull private final CloseableRegistry cancelStreamRegistry;
+
+    @Nonnull private final ExecutionType executionType;
+
+    public SnapshotStrategyRunner(
+            @Nonnull String description,
+            @Nonnull SnapshotStrategy<T, SR> snapshotStrategy,
+            @Nonnull CloseableRegistry cancelStreamRegistry,
+            @Nonnull ExecutionType executionType) {
+        this.description = description;
+        this.snapshotStrategy = snapshotStrategy;
+        this.cancelStreamRegistry = cancelStreamRegistry;
+        this.executionType = executionType;
+    }
+
+    @Nonnull
+    public final RunnableFuture<SnapshotResult<T>> snapshot(
+            long checkpointId,
+            long timestamp,
+            @Nonnull CheckpointStreamFactory streamFactory,
+            @Nonnull CheckpointOptions checkpointOptions)
+            throws Exception {
+        long startTime = System.currentTimeMillis();
+        SR snapshotResources = snapshotStrategy.syncPrepareResources(checkpointId);
+        logCompletedInternal(LOG_SYNC_COMPLETED_TEMPLATE, streamFactory, startTime);
+        SnapshotStrategy.SnapshotResultSupplier<T> asyncSnapshot =
+                snapshotStrategy.asyncSnapshot(
+                        snapshotResources,
+                        checkpointId,
+                        timestamp,
+                        streamFactory,
+                        checkpointOptions);
+
+        switch (executionType) {
+            case SYNCHRONOUS:
+                return DoneFuture.of(asyncSnapshot.get(cancelStreamRegistry));

Review comment:
       Good catch. I think this is actually a bug, as it is using a different one. With this registry the main checkpointing thread(from which the `snapshot` method is executed) might not get cancelled before shutting down the io streams.
   
   I will rewrite the code to always go through the `AsyncSnapshotTask`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     }, {
       "hash" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379",
       "triggerID" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386",
       "triggerID" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "triggerType" : "PUSH"
     }, {
       "hash" : "589607a9653384d83bdcd2292c893b2241f2b2c1",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12481",
       "triggerID" : "589607a9653384d83bdcd2292c893b2241f2b2c1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * 589607a9653384d83bdcd2292c893b2241f2b2c1 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12481) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] aljoscha commented on a change in pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
aljoscha commented on a change in pull request #14719:
URL: https://github.com/apache/flink/pull/14719#discussion_r561991514



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/StateTableFactory.java
##########
@@ -22,18 +22,14 @@
 import org.apache.flink.runtime.state.RegisteredKeyValueStateBackendMetaInfo;
 
 /**
- * Interface for synchronicity behavior of heap snapshot strategy.
+ * A factory method for creating a {@link StateTable}.

Review comment:
       ```suggestion
    * A factory for {@link StateTable StateTables}.
   ```

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/DefaultOperatorStateBackendSnapshotStrategy.java
##########
@@ -106,119 +99,133 @@ protected DefaultOperatorStateBackendSnapshotStrategy(
             Thread.currentThread().setContextClassLoader(snapshotClassLoader);
         }
 
-        AsyncSnapshotCallable<SnapshotResult<OperatorStateHandle>> snapshotCallable =
-                new AsyncSnapshotCallable<SnapshotResult<OperatorStateHandle>>() {
-
-                    @Override
-                    protected SnapshotResult<OperatorStateHandle> callInternal() throws Exception {
-
-                        CheckpointStreamFactory.CheckpointStateOutputStream localOut =
-                                streamFactory.createCheckpointStateOutputStream(
-                                        CheckpointedStateScope.EXCLUSIVE);
-                        snapshotCloseableRegistry.registerCloseable(localOut);
-
-                        // get the registered operator state infos ...
-                        List<StateMetaInfoSnapshot> operatorMetaInfoSnapshots =
-                                new ArrayList<>(registeredOperatorStatesDeepCopies.size());
-
-                        for (Map.Entry<String, PartitionableListState<?>> entry :
-                                registeredOperatorStatesDeepCopies.entrySet()) {
-                            operatorMetaInfoSnapshots.add(
-                                    entry.getValue().getStateMetaInfo().snapshot());
-                        }
-
-                        // ... get the registered broadcast operator state infos ...
-                        List<StateMetaInfoSnapshot> broadcastMetaInfoSnapshots =
-                                new ArrayList<>(registeredBroadcastStatesDeepCopies.size());
-
-                        for (Map.Entry<String, BackendWritableBroadcastState<?, ?>> entry :
-                                registeredBroadcastStatesDeepCopies.entrySet()) {
-                            broadcastMetaInfoSnapshots.add(
-                                    entry.getValue().getStateMetaInfo().snapshot());
-                        }
-
-                        // ... write them all in the checkpoint stream ...
-                        DataOutputView dov = new DataOutputViewStreamWrapper(localOut);
-
-                        OperatorBackendSerializationProxy backendSerializationProxy =
-                                new OperatorBackendSerializationProxy(
-                                        operatorMetaInfoSnapshots, broadcastMetaInfoSnapshots);
-
-                        backendSerializationProxy.write(dov);
-
-                        // ... and then go for the states ...
-
-                        // we put BOTH normal and broadcast state metadata here
-                        int initialMapCapacity =
-                                registeredOperatorStatesDeepCopies.size()
-                                        + registeredBroadcastStatesDeepCopies.size();
-                        final Map<String, OperatorStateHandle.StateMetaInfo> writtenStatesMetaData =
-                                new HashMap<>(initialMapCapacity);
-
-                        for (Map.Entry<String, PartitionableListState<?>> entry :
-                                registeredOperatorStatesDeepCopies.entrySet()) {
-
-                            PartitionableListState<?> value = entry.getValue();
-                            long[] partitionOffsets = value.write(localOut);
-                            OperatorStateHandle.Mode mode =
-                                    value.getStateMetaInfo().getAssignmentMode();
-                            writtenStatesMetaData.put(
-                                    entry.getKey(),
-                                    new OperatorStateHandle.StateMetaInfo(partitionOffsets, mode));
-                        }
-
-                        // ... and the broadcast states themselves ...
-                        for (Map.Entry<String, BackendWritableBroadcastState<?, ?>> entry :
-                                registeredBroadcastStatesDeepCopies.entrySet()) {
-
-                            BackendWritableBroadcastState<?, ?> value = entry.getValue();
-                            long[] partitionOffsets = {value.write(localOut)};
-                            OperatorStateHandle.Mode mode =
-                                    value.getStateMetaInfo().getAssignmentMode();
-                            writtenStatesMetaData.put(
-                                    entry.getKey(),
-                                    new OperatorStateHandle.StateMetaInfo(partitionOffsets, mode));
-                        }
-
-                        // ... and, finally, create the state handle.
-                        OperatorStateHandle retValue = null;
-
-                        if (snapshotCloseableRegistry.unregisterCloseable(localOut)) {
-
-                            StreamStateHandle stateHandle = localOut.closeAndGetHandle();
-
-                            if (stateHandle != null) {
-                                retValue =
-                                        new OperatorStreamStateHandle(
-                                                writtenStatesMetaData, stateHandle);
-                            }
-
-                            return SnapshotResult.of(retValue);
-                        } else {
-                            throw new IOException("Stream was already unregistered.");
-                        }
-                    }
+        return new DefaultOperatorStateBackendSnapshotResources(
+                registeredOperatorStatesDeepCopies, registeredBroadcastStatesDeepCopies);
+    }
 
-                    @Override
-                    protected void cleanupProvidedResources() {
-                        // nothing to do
-                    }
+    @Override
+    public SupplierWithException<SnapshotResult<OperatorStateHandle>, ? extends Exception>
+            asyncSnapshot(
+                    DefaultOperatorStateBackendSnapshotResources syncPartResource,
+                    long checkpointId,
+                    long timestamp,
+                    @Nonnull CheckpointStreamFactory streamFactory,
+                    @Nonnull CheckpointOptions checkpointOptions) {
+
+        if (syncPartResource.getRegisteredBroadcastStatesDeepCopies().isEmpty()

Review comment:
       You could get the sync-part resources once instead of always calling methods on the "Resources". This would make the diff smaller, at least for me when I'm looking at it in the IDE.
   
   Same holds for the other refactored strategies.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/Snapshottable.java
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.annotation.Internal;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * Interface for objects that can snapshot its state (state backends currently). Implementing
+ * classes should ideally be stateless or at least threadsafe, i.e. this is a functional interface
+ * and is can be called in parallel by multiple checkpoints.
+ *
+ * @param <S> type of the returned state object that represents the result of the snapshot
+ *     operation.
+ * @see SnapshotStrategy
+ * @see SnapshotStrategyRunner
+ */
+@Internal
+public interface Snapshottable<S extends StateObject> {

Review comment:
       I would go for `Snapshotable`, that's also what other similar projects seem to use: https://docs.oracle.com/cd/E10926_01/doc/owb.101/b12155/oracle/owb/metadatamgmt/changemgmt/Snapshotable.html

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/DefaultOperatorStateBackend.java
##########
@@ -83,7 +83,7 @@
 
     private final Map<String, BackendWritableBroadcastState<?, ?>> accessedBroadcastStatesByName;
 
-    private final AbstractSnapshotStrategy<OperatorStateHandle> snapshotStrategy;
+    private final SnapshotStrategyRunner<OperatorStateHandle, ?> snapshotStrategy;

Review comment:
       In some places this could now be called `snapshotStrategyRunner` to reflect that it's now a runner.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/SnapshotStrategyRunner.java
##########
@@ -0,0 +1,122 @@
+/*
+ * 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.core.fs.CloseableRegistry;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.util.function.SupplierWithException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * A class to execute a {@link SnapshotStrategy}. It can execute a strategy either synchronously or
+ * asynchronously. It takes care of common logging and resource cleaning.
+ *
+ * @param <T> type of the snapshot result.
+ */
+public final class SnapshotStrategyRunner<T extends StateObject, SR extends SnapshotResources> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(SnapshotStrategyRunner.class);
+
+    private static final String LOG_SYNC_COMPLETED_TEMPLATE =
+            "{} ({}, synchronous part) in thread {} took {} ms.";
+    private static final String LOG_ASYNC_COMPLETED_TEMPLATE =
+            "{} ({}, asynchronous part) in thread {} took {} ms.";
+
+    /**
+     * Descriptive name of the snapshot strategy that will appear in the log outputs and {@link
+     * #toString()}.
+     */
+    @Nonnull private final String description;
+
+    @Nonnull private final SnapshotStrategy<T, SR> snapshotStrategy;
+    @Nonnull private final CloseableRegistry cancelStreamRegistry;
+
+    @Nonnull private final boolean isSynchronous;
+
+    public SnapshotStrategyRunner(
+            @Nonnull String description,
+            @Nonnull SnapshotStrategy<T, SR> snapshotStrategy,
+            @Nonnull CloseableRegistry cancelStreamRegistry,
+            boolean isSynchronous) {

Review comment:
       nit: I was already confused about what `true` or `false` meant when I saw callsites. Maybe some enum with `SYNCHRONOUS` `ASYNCHRONOUS` would help.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     }, {
       "hash" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379",
       "triggerID" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * 86bea6e122e1b358ad42ce7849e0cfe99572ed7c Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379) 
   * cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] aljoscha commented on a change in pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
aljoscha commented on a change in pull request #14719:
URL: https://github.com/apache/flink/pull/14719#discussion_r561991514



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/StateTableFactory.java
##########
@@ -22,18 +22,14 @@
 import org.apache.flink.runtime.state.RegisteredKeyValueStateBackendMetaInfo;
 
 /**
- * Interface for synchronicity behavior of heap snapshot strategy.
+ * A factory method for creating a {@link StateTable}.

Review comment:
       ```suggestion
    * A factory for {@link StateTable StateTables}.
   ```

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/DefaultOperatorStateBackendSnapshotStrategy.java
##########
@@ -106,119 +99,133 @@ protected DefaultOperatorStateBackendSnapshotStrategy(
             Thread.currentThread().setContextClassLoader(snapshotClassLoader);
         }
 
-        AsyncSnapshotCallable<SnapshotResult<OperatorStateHandle>> snapshotCallable =
-                new AsyncSnapshotCallable<SnapshotResult<OperatorStateHandle>>() {
-
-                    @Override
-                    protected SnapshotResult<OperatorStateHandle> callInternal() throws Exception {
-
-                        CheckpointStreamFactory.CheckpointStateOutputStream localOut =
-                                streamFactory.createCheckpointStateOutputStream(
-                                        CheckpointedStateScope.EXCLUSIVE);
-                        snapshotCloseableRegistry.registerCloseable(localOut);
-
-                        // get the registered operator state infos ...
-                        List<StateMetaInfoSnapshot> operatorMetaInfoSnapshots =
-                                new ArrayList<>(registeredOperatorStatesDeepCopies.size());
-
-                        for (Map.Entry<String, PartitionableListState<?>> entry :
-                                registeredOperatorStatesDeepCopies.entrySet()) {
-                            operatorMetaInfoSnapshots.add(
-                                    entry.getValue().getStateMetaInfo().snapshot());
-                        }
-
-                        // ... get the registered broadcast operator state infos ...
-                        List<StateMetaInfoSnapshot> broadcastMetaInfoSnapshots =
-                                new ArrayList<>(registeredBroadcastStatesDeepCopies.size());
-
-                        for (Map.Entry<String, BackendWritableBroadcastState<?, ?>> entry :
-                                registeredBroadcastStatesDeepCopies.entrySet()) {
-                            broadcastMetaInfoSnapshots.add(
-                                    entry.getValue().getStateMetaInfo().snapshot());
-                        }
-
-                        // ... write them all in the checkpoint stream ...
-                        DataOutputView dov = new DataOutputViewStreamWrapper(localOut);
-
-                        OperatorBackendSerializationProxy backendSerializationProxy =
-                                new OperatorBackendSerializationProxy(
-                                        operatorMetaInfoSnapshots, broadcastMetaInfoSnapshots);
-
-                        backendSerializationProxy.write(dov);
-
-                        // ... and then go for the states ...
-
-                        // we put BOTH normal and broadcast state metadata here
-                        int initialMapCapacity =
-                                registeredOperatorStatesDeepCopies.size()
-                                        + registeredBroadcastStatesDeepCopies.size();
-                        final Map<String, OperatorStateHandle.StateMetaInfo> writtenStatesMetaData =
-                                new HashMap<>(initialMapCapacity);
-
-                        for (Map.Entry<String, PartitionableListState<?>> entry :
-                                registeredOperatorStatesDeepCopies.entrySet()) {
-
-                            PartitionableListState<?> value = entry.getValue();
-                            long[] partitionOffsets = value.write(localOut);
-                            OperatorStateHandle.Mode mode =
-                                    value.getStateMetaInfo().getAssignmentMode();
-                            writtenStatesMetaData.put(
-                                    entry.getKey(),
-                                    new OperatorStateHandle.StateMetaInfo(partitionOffsets, mode));
-                        }
-
-                        // ... and the broadcast states themselves ...
-                        for (Map.Entry<String, BackendWritableBroadcastState<?, ?>> entry :
-                                registeredBroadcastStatesDeepCopies.entrySet()) {
-
-                            BackendWritableBroadcastState<?, ?> value = entry.getValue();
-                            long[] partitionOffsets = {value.write(localOut)};
-                            OperatorStateHandle.Mode mode =
-                                    value.getStateMetaInfo().getAssignmentMode();
-                            writtenStatesMetaData.put(
-                                    entry.getKey(),
-                                    new OperatorStateHandle.StateMetaInfo(partitionOffsets, mode));
-                        }
-
-                        // ... and, finally, create the state handle.
-                        OperatorStateHandle retValue = null;
-
-                        if (snapshotCloseableRegistry.unregisterCloseable(localOut)) {
-
-                            StreamStateHandle stateHandle = localOut.closeAndGetHandle();
-
-                            if (stateHandle != null) {
-                                retValue =
-                                        new OperatorStreamStateHandle(
-                                                writtenStatesMetaData, stateHandle);
-                            }
-
-                            return SnapshotResult.of(retValue);
-                        } else {
-                            throw new IOException("Stream was already unregistered.");
-                        }
-                    }
+        return new DefaultOperatorStateBackendSnapshotResources(
+                registeredOperatorStatesDeepCopies, registeredBroadcastStatesDeepCopies);
+    }
 
-                    @Override
-                    protected void cleanupProvidedResources() {
-                        // nothing to do
-                    }
+    @Override
+    public SupplierWithException<SnapshotResult<OperatorStateHandle>, ? extends Exception>
+            asyncSnapshot(
+                    DefaultOperatorStateBackendSnapshotResources syncPartResource,
+                    long checkpointId,
+                    long timestamp,
+                    @Nonnull CheckpointStreamFactory streamFactory,
+                    @Nonnull CheckpointOptions checkpointOptions) {
+
+        if (syncPartResource.getRegisteredBroadcastStatesDeepCopies().isEmpty()

Review comment:
       You could get the sync-part resources once instead of always calling methods on the "Resources". This would make the diff smaller, at least for me when I'm looking at it in the IDE.
   
   Same holds for the other refactored strategies.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/Snapshottable.java
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.annotation.Internal;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * Interface for objects that can snapshot its state (state backends currently). Implementing
+ * classes should ideally be stateless or at least threadsafe, i.e. this is a functional interface
+ * and is can be called in parallel by multiple checkpoints.
+ *
+ * @param <S> type of the returned state object that represents the result of the snapshot
+ *     operation.
+ * @see SnapshotStrategy
+ * @see SnapshotStrategyRunner
+ */
+@Internal
+public interface Snapshottable<S extends StateObject> {

Review comment:
       I would go for `Snapshotable`, that's also what other similar projects seem to use: https://docs.oracle.com/cd/E10926_01/doc/owb.101/b12155/oracle/owb/metadatamgmt/changemgmt/Snapshotable.html

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/DefaultOperatorStateBackend.java
##########
@@ -83,7 +83,7 @@
 
     private final Map<String, BackendWritableBroadcastState<?, ?>> accessedBroadcastStatesByName;
 
-    private final AbstractSnapshotStrategy<OperatorStateHandle> snapshotStrategy;
+    private final SnapshotStrategyRunner<OperatorStateHandle, ?> snapshotStrategy;

Review comment:
       In some places this could now be called `snapshotStrategyRunner` to reflect that it's now a runner.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/SnapshotStrategyRunner.java
##########
@@ -0,0 +1,122 @@
+/*
+ * 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.core.fs.CloseableRegistry;
+import org.apache.flink.runtime.checkpoint.CheckpointOptions;
+import org.apache.flink.util.function.SupplierWithException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nonnull;
+
+import java.util.concurrent.RunnableFuture;
+
+/**
+ * A class to execute a {@link SnapshotStrategy}. It can execute a strategy either synchronously or
+ * asynchronously. It takes care of common logging and resource cleaning.
+ *
+ * @param <T> type of the snapshot result.
+ */
+public final class SnapshotStrategyRunner<T extends StateObject, SR extends SnapshotResources> {
+
+    private static final Logger LOG = LoggerFactory.getLogger(SnapshotStrategyRunner.class);
+
+    private static final String LOG_SYNC_COMPLETED_TEMPLATE =
+            "{} ({}, synchronous part) in thread {} took {} ms.";
+    private static final String LOG_ASYNC_COMPLETED_TEMPLATE =
+            "{} ({}, asynchronous part) in thread {} took {} ms.";
+
+    /**
+     * Descriptive name of the snapshot strategy that will appear in the log outputs and {@link
+     * #toString()}.
+     */
+    @Nonnull private final String description;
+
+    @Nonnull private final SnapshotStrategy<T, SR> snapshotStrategy;
+    @Nonnull private final CloseableRegistry cancelStreamRegistry;
+
+    @Nonnull private final boolean isSynchronous;
+
+    public SnapshotStrategyRunner(
+            @Nonnull String description,
+            @Nonnull SnapshotStrategy<T, SR> snapshotStrategy,
+            @Nonnull CloseableRegistry cancelStreamRegistry,
+            boolean isSynchronous) {

Review comment:
       nit: I was already confused about what `true` or `false` meant when I saw callsites. Maybe some enum with `SYNCHRONOUS` `ASYNCHRONOUS` would help.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9a6345ae454ff88f86890f33d8521232528cd562 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337) 
   * 13958f5caee468adbdb527dde26c82654812d7ac Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * e30fd158cf8f882fb9889e9668911575d5af18ab Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 13958f5caee468adbdb527dde26c82654812d7ac Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340) 
   * 452bc93ad4bb9c0085b57990b413d442453f66ca Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * 59019b822a535cd01e0e8e6812f57ee36d6ea918 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     }, {
       "hash" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379",
       "triggerID" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386",
       "triggerID" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764621386


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 9a6345ae454ff88f86890f33d8521232528cd562 (Thu Jan 21 12:50:04 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9a6345ae454ff88f86890f33d8521232528cd562 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337) 
   * 13958f5caee468adbdb527dde26c82654812d7ac UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * 59019b822a535cd01e0e8e6812f57ee36d6ea918 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371) 
   * c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     }, {
       "hash" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379",
       "triggerID" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386",
       "triggerID" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "triggerType" : "PUSH"
     }, {
       "hash" : "589607a9653384d83bdcd2292c893b2241f2b2c1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "589607a9653384d83bdcd2292c893b2241f2b2c1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386) 
   * 589607a9653384d83bdcd2292c893b2241f2b2c1 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #14719: [FLINK-21072] Refactor the SnapshotStrategy hierarchy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #14719:
URL: https://github.com/apache/flink/pull/14719#issuecomment-764631410


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12337",
       "triggerID" : "9a6345ae454ff88f86890f33d8521232528cd562",
       "triggerType" : "PUSH"
     }, {
       "hash" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12340",
       "triggerID" : "13958f5caee468adbdb527dde26c82654812d7ac",
       "triggerType" : "PUSH"
     }, {
       "hash" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12342",
       "triggerID" : "452bc93ad4bb9c0085b57990b413d442453f66ca",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12353",
       "triggerID" : "9b091e36ae668129b9f23765ab233a411c6cd1aa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "4197ba5c2e6681045851248a784f79b8ebf9ffdd",
       "triggerType" : "PUSH"
     }, {
       "hash" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12355",
       "triggerID" : "e30fd158cf8f882fb9889e9668911575d5af18ab",
       "triggerType" : "PUSH"
     }, {
       "hash" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12371",
       "triggerID" : "59019b822a535cd01e0e8e6812f57ee36d6ea918",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12376",
       "triggerID" : "c95a52d7dcca28f302d2f519eb8bc8b4c4c3dd99",
       "triggerType" : "PUSH"
     }, {
       "hash" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379",
       "triggerID" : "86bea6e122e1b358ad42ce7849e0cfe99572ed7c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386",
       "triggerID" : "cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 4197ba5c2e6681045851248a784f79b8ebf9ffdd UNKNOWN
   * 86bea6e122e1b358ad42ce7849e0cfe99572ed7c Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12379) 
   * cc6c13e40d5b3a60ad6c2df1a3a09049f1cded44 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12386) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org