zhuzhurk commented on code in PR #25469:
URL: https://github.com/apache/flink/pull/25469#discussion_r1794501694


##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/graph/ExecutionPlan.java:
##########
@@ -0,0 +1,210 @@
+/*
+ * 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.streaming.api.graph;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.cache.DistributedCache;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.blob.PermanentBlobKey;
+import org.apache.flink.runtime.jobgraph.JobType;
+import org.apache.flink.runtime.jobgraph.SavepointRestoreSettings;
+import org.apache.flink.runtime.jobgraph.tasks.JobCheckpointingSettings;
+import org.apache.flink.util.SerializedValue;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * An interface representing a general execution plan, which can be 
implemented by different types
+ * of graphs such as JobGraph and StreamGraph.
+ *
+ * <p>This interface provides methods for accessing general properties of 
execution plans, such as
+ * the job id and job name.
+ */
+@Internal
+public interface ExecutionPlan extends Serializable {
+    long serialVersionUID = 1L;
+
+    ConfigOption<Long> INITIAL_CLIENT_HEARTBEAT_TIMEOUT =

Review Comment:
   How about to avoid using it in the way of `ConfigOption`, but using a 
internal field. Otherwise it will pollute the job configuration with internal 
configuration? In the future we may expose job configuration to users.



##########
flink-runtime/src/main/java/org/apache/flink/streaming/api/graph/ExecutionPlan.java:
##########
@@ -0,0 +1,210 @@
+/*
+ * 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.streaming.api.graph;
+
+import org.apache.flink.annotation.Internal;
+import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.JobID;
+import org.apache.flink.api.common.cache.DistributedCache;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
+import org.apache.flink.runtime.blob.PermanentBlobKey;
+import org.apache.flink.runtime.jobgraph.JobType;
+import org.apache.flink.runtime.jobgraph.SavepointRestoreSettings;
+import org.apache.flink.runtime.jobgraph.tasks.JobCheckpointingSettings;
+import org.apache.flink.util.SerializedValue;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * An interface representing a general execution plan, which can be 
implemented by different types
+ * of graphs such as JobGraph and StreamGraph.
+ *
+ * <p>This interface provides methods for accessing general properties of 
execution plans, such as
+ * the job id and job name.
+ */
+@Internal
+public interface ExecutionPlan extends Serializable {
+    long serialVersionUID = 1L;
+
+    ConfigOption<Long> INITIAL_CLIENT_HEARTBEAT_TIMEOUT =
+            ConfigOptions.key("initialClientHeartbeatTimeout")
+                    .longType()
+                    .defaultValue(Long.MIN_VALUE);
+
+    /**
+     * Gets the unique identifier of the job.
+     *
+     * @return the job id
+     */
+    JobID getJobID();
+
+    /**
+     * Gets the name of the job.
+     *
+     * @return the job name
+     */
+    String getName();
+
+    /**
+     * Gets the type of the job.
+     *
+     * @return the job type
+     */
+    JobType getJobType();
+
+    /**
+     * Checks if the execution plan is dynamic.
+     *
+     * @return true if the execution plan is dynamic; false otherwise
+     */
+    boolean isDynamic();
+
+    /**
+     * Gets the settings for job checkpointing.
+     *
+     * @return the checkpointing settings
+     */
+    JobCheckpointingSettings getCheckpointingSettings();
+
+    /**
+     * Checks if the execution plan is empty.
+     *
+     * @return true if the plan is empty; false otherwise
+     */
+    boolean isEmpty();

Review Comment:
   This seems to be a new interface to do some new sanity check. Is it 
necessary?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to