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/28 09:02:39 UTC

[GitHub] [flink] rmetzger opened a new pull request #14790: [FLINK-21134] Introduce 'execution-mode' config option

rmetzger opened a new pull request #14790:
URL: https://github.com/apache/flink/pull/14790


   
   ## What is the purpose of the change
   
   This is part of FLIP-159 / Reactive Mode. The execution-mode config option is introduced for checking if it is supported with the used cluster entrypoint implementation.
   
   
   ## Verifying this change
   
   
   This change added 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**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
   
   I updated the config options
   


----------------------------------------------------------------
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] twalthr commented on a change in pull request #14790: [FLINK-21134] Introduce 'execution-mode' config option

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



##########
File path: flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
##########
@@ -358,6 +359,18 @@
                                     .list(text("'ng': new generation scheduler"))
                                     .build());
 
+    @Documentation.Section(Documentation.Sections.EXPERT_SCHEDULING)
+    public static final ConfigOption<SchedulerExecutionMode> SCHEDULER_EXECUTION_MODE =
+            key("execution-mode")

Review comment:
       Isn't this option a bit misleading with our batch/streaming execution mode? 
   
   https://ci.apache.org/projects/flink/flink-docs-release-1.12/concepts/glossary.html#runtime-execution-mode
   
   Wouldn't `scheduler-mode` be more specific to avoid confusion?




----------------------------------------------------------------
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 #14790: [FLINK-21134] Introduce 'execution-mode' config option

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595",
       "triggerID" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595) 
   
   <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] zentol commented on a change in pull request #14790: [FLINK-21134] Introduce 'execution-mode' config option

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
##########
@@ -151,6 +153,19 @@ protected ClusterEntrypoint(Configuration configuration) {
         this.configuration = generateClusterConfiguration(configuration);
         this.terminationFuture = new CompletableFuture<>();
 
+        if (configuration.get(JobManagerOptions.SCHEDULER_EXECUTION_MODE)
+                        == SchedulerExecutionMode.REACTIVE
+                && !this.getClass()
+                        .getSimpleName()
+                        .equals("StandaloneApplicationClusterEntryPoint")) {

Review comment:
       let's add `protected boolean supportsReactiveMode() { return false; }` and override it in the `StandaloneApplicationClusterEntryPoint`
   adjust the test accordingly to use a test entrypoint implementation.




----------------------------------------------------------------
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 #14790: [FLINK-21134] Introduce 'scheduler-mode' config option

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595",
       "triggerID" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2091ecc59adf36056b22d2779716c556d7ef6721",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13085",
       "triggerID" : "2091ecc59adf36056b22d2779716c556d7ef6721",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2091ecc59adf36056b22d2779716c556d7ef6721 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13085) 
   
   <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 #14790: [FLINK-21134] Introduce 'scheduler-mode' config option

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595",
       "triggerID" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2091ecc59adf36056b22d2779716c556d7ef6721",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2091ecc59adf36056b22d2779716c556d7ef6721",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595) 
   * 2091ecc59adf36056b22d2779716c556d7ef6721 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] rmetzger commented on pull request #14790: [FLINK-21134] Introduce 'scheduler-mode' config option

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


   Thanks for your review!


----------------------------------------------------------------
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] rmetzger commented on pull request #14790: [FLINK-21134] Introduce 'execution-mode' config option

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


   Thanks for your feedback! I addressed all comments and rebased to the latest master.


----------------------------------------------------------------
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] zentol commented on a change in pull request #14790: [FLINK-21134] Introduce 'scheduler-mode' config option

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/entrypoint/ClusterEntrypointTest.java
##########
@@ -0,0 +1,66 @@
+/*
+ * 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.entrypoint;
+
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.configuration.IllegalConfigurationException;
+import org.apache.flink.configuration.JobManagerOptions;
+import org.apache.flink.configuration.SchedulerExecutionMode;
+import org.apache.flink.runtime.concurrent.ScheduledExecutor;
+import org.apache.flink.runtime.dispatcher.ArchivedExecutionGraphStore;
+import org.apache.flink.runtime.entrypoint.component.DispatcherResourceManagerComponentFactory;
+
+import org.junit.Test;
+
+import java.io.IOException;
+
+import static org.junit.Assert.fail;
+
+/** Tests for the {@link ClusterEntrypoint}. */
+public class ClusterEntrypointTest {
+
+    @Test(expected = IllegalConfigurationException.class)
+    public void testStandaloneSessionClusterEntrypointDeniedInReactiveMode() {
+        Configuration configuration = new Configuration();
+        configuration.set(JobManagerOptions.SCHEDULER_MODE, SchedulerExecutionMode.REACTIVE);
+        new MockEntryPoint(configuration);
+        fail("Entrypoint initialization is supposed to fail");
+    }
+
+    private static class MockEntryPoint extends ClusterEntrypoint {

Review comment:
       maybe explicitly override the new method to return false, in case we invert the default behavior at some point.




----------------------------------------------------------------
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] rmetzger commented on a change in pull request #14790: [FLINK-21134] Introduce 'execution-mode' config option

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



##########
File path: flink-core/src/main/java/org/apache/flink/configuration/JobManagerOptions.java
##########
@@ -358,6 +359,18 @@
                                     .list(text("'ng': new generation scheduler"))
                                     .build());
 
+    @Documentation.Section(Documentation.Sections.EXPERT_SCHEDULING)
+    public static final ConfigOption<SchedulerExecutionMode> SCHEDULER_EXECUTION_MODE =
+            key("execution-mode")

Review comment:
       Thanks a lot for your feedback. I will rename it to `scheduler-mode`.




----------------------------------------------------------------
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 #14790: [FLINK-21134] Introduce 'scheduler-mode' config option

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595",
       "triggerID" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2091ecc59adf36056b22d2779716c556d7ef6721",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13085",
       "triggerID" : "2091ecc59adf36056b22d2779716c556d7ef6721",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595) 
   * 2091ecc59adf36056b22d2779716c556d7ef6721 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13085) 
   
   <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 #14790: [FLINK-21134] Introduce 'execution-mode' config option

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595",
       "triggerID" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12595) 
   
   <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] zentol commented on a change in pull request #14790: [FLINK-21134] Introduce 'execution-mode' config option

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/ClusterEntrypoint.java
##########
@@ -151,6 +153,19 @@ protected ClusterEntrypoint(Configuration configuration) {
         this.configuration = generateClusterConfiguration(configuration);
         this.terminationFuture = new CompletableFuture<>();
 
+        if (configuration.get(JobManagerOptions.SCHEDULER_EXECUTION_MODE)
+                        == SchedulerExecutionMode.REACTIVE
+                && !this.getClass()
+                        .getSimpleName()
+                        .equals("StandaloneApplicationClusterEntryPoint")) {

Review comment:
       let's add `protected boolean supportsReactiveMode() { return false; }` and override it in the `StandaloneApplicationClusterEntryPoint`
   adjust the test accordingly to use a test entrypoint implementation.




----------------------------------------------------------------
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] rmetzger closed pull request #14790: [FLINK-21134] Introduce 'scheduler-mode' config option

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


   


----------------------------------------------------------------
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 #14790: [FLINK-21134] Introduce 'execution-mode' config option

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


   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 91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406 (Thu Jan 28 09:04:51 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 commented on pull request #14790: [FLINK-21134] Introduce 'execution-mode' config option

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 91d2fe95d95e5e3874ac056cc4ebd6d8dbc5d406 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