Zakelly commented on code in PR #24368:
URL: https://github.com/apache/flink/pull/24368#discussion_r1500320132


##########
flink-core/src/main/java/org/apache/flink/configuration/StateRecoveryOptions.java:
##########
@@ -0,0 +1,100 @@
+/*
+ * 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.configuration;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.annotation.docs.Documentation;
+import org.apache.flink.configuration.description.Description;
+import org.apache.flink.core.execution.RestoreMode;
+
+import static org.apache.flink.configuration.ConfigOptions.key;
+
+/**
+ * The {@link ConfigOption configuration options} used when restoring state 
from a savepoint or a
+ * checkpoint.
+ */
+@PublicEvolving
+public class StateRecoveryOptions {
+
+    /** The path to a savepoint that will be used to bootstrap the pipeline's 
state. */
+    public static final ConfigOption<String> SAVEPOINT_PATH =
+            key("execution.state-recovery.path")
+                    .stringType()
+                    .noDefaultValue()
+                    .withDeprecatedKeys("execution.savepoint.path")
+                    .withDescription(
+                            "Path to a savepoint to restore the job from (for 
example hdfs:///flink/savepoint-1537).");
+
+    /**
+     * A flag indicating if we allow Flink to skip savepoint state that cannot 
be restored, e.g.
+     * because the corresponding operator has been removed.
+     */
+    public static final ConfigOption<Boolean> SAVEPOINT_IGNORE_UNCLAIMED_STATE 
=
+            key("execution.state-recovery.ignore-unclaimed-state")
+                    .booleanType()
+                    .defaultValue(false)
+                    
.withDeprecatedKeys("execution.savepoint.ignore-unclaimed-state")
+                    .withDescription(
+                            "Allow to skip savepoint state that cannot be 
restored. "
+                                    + "Allow this if you removed an operator 
from your pipeline after the savepoint was triggered.");
+    /**
+     * Describes the mode how Flink should restore from the given savepoint or 
retained checkpoint.
+     */
+    public static final ConfigOption<RestoreMode> RESTORE_MODE =
+            key("execution.state-recovery.claim-mode")

Review Comment:
   This has been discussed in the FLIP, and I think it does not describe the 
behavior of 'restore', it actually defines how the old checkpoint files are 
claimed.
   I suggest we rename the class `RestoreMode` to `RecoveryClaimMode` later in 
Flink 2.0, WDYT?



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

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

Reply via email to