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 2020/10/15 19:33:35 UTC

[GitHub] [flink] kl0u opened a new pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

kl0u opened a new pull request #13656:
URL: https://github.com/apache/flink/pull/13656


   ## What is the purpose of the change
   
   As part of [FLIP-134](https://cwiki.apache.org/confluence/display/FLINK/FLIP-134%3A+Batch+execution+for+the+DataStream+API), this PR exposes the `execution.runtime-mode` to the users. This options allows users to specify, among other things, the task scheduling, network shuffle behaviour, and the time semantics.
   
   In addition now we throw an `IllegalArgumentException` when we detect that the user has requested `BATCH` execution with an unbounded source.
   
   ## Brief change log
   
   The changes are in the `StreamExecutionEnvironment` and the `StreamGraphGenerator`.
   
   ## Verifying this change
   
    *Added tests in the `StreamGraphGeneratorExecutionModeDetectionTest`
   
   ## 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] kl0u commented on a change in pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java
##########
@@ -244,19 +245,30 @@ private void configureStreamGraph(final StreamGraph graph) {
 	}
 
 	private boolean shouldExecuteInBatchMode(final RuntimeExecutionMode configuredMode) {
+		final boolean existsUnboundedSource = existsContinuousSource();
+
+		if (configuredMode == RuntimeExecutionMode.BATCH && existsUnboundedSource) {

Review comment:
       Was also not decided on that. I went with `argument` because it is something set by the user. But it may make sense to put `state` because `argument` seems more mild.




----------------------------------------------------------------
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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759",
       "triggerID" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b28ac93e6454e96ad9179e81ff76b665ea870c81 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748) 
   * 88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759) 
   * a9c04a955b538391702fd5407f5261cdb3911ee7 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] dawidwys commented on a change in pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RuntimeOptions.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.environment;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+import org.apache.flink.streaming.api.RuntimeExecutionMode;
+
+/**
+ * Execution {@link ConfigOption options} for configuring the runtime behavior of the pipeline.
+ *
+ * @see RuntimeExecutionMode
+ */
+@PublicEvolving
+public class RuntimeOptions {
+
+	public static final ConfigOption<RuntimeExecutionMode> RUNTIME_MODE =
+			ConfigOptions.key("execution.runtime-mode")
+					.enumType(RuntimeExecutionMode.class)

Review comment:
       nit: Can't we put it into the `ExecutionOptions`? Do we need a separate group for it?

##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java
##########
@@ -244,19 +245,30 @@ private void configureStreamGraph(final StreamGraph graph) {
 	}
 
 	private boolean shouldExecuteInBatchMode(final RuntimeExecutionMode configuredMode) {
+		final boolean existsUnboundedSource = existsContinuousSource();
+
+		if (configuredMode == RuntimeExecutionMode.BATCH && existsUnboundedSource) {
+			throw new IllegalArgumentException(
+					"Detected an UNBOUNDED source with the '" + RuntimeOptions.RUNTIME_MODE.key() + "' set to 'BATCH'. " +
+							"This combination is not allowed, please set the '" + RuntimeOptions.RUNTIME_MODE.key() +
+							"' to STREAMING or AUTOMATIC");
+		}
+
 		if (checkNotNull(configuredMode) != RuntimeExecutionMode.AUTOMATIC) {
 			return configuredMode == RuntimeExecutionMode.BATCH;
 		}
+		return !existsUnboundedSource;
+	}
 
-		final boolean continuousSourceExists = transformations
+	private boolean existsContinuousSource() {

Review comment:
       nit: `existsUnboundedSource`

##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java
##########
@@ -244,19 +245,30 @@ private void configureStreamGraph(final StreamGraph graph) {
 	}
 
 	private boolean shouldExecuteInBatchMode(final RuntimeExecutionMode configuredMode) {
+		final boolean existsUnboundedSource = existsContinuousSource();
+
+		if (configuredMode == RuntimeExecutionMode.BATCH && existsUnboundedSource) {

Review comment:
       nit: `checkArgument`? I am undecided myself, but shall we use `IllegalArgumentException` or `IllegalStateException` in those cases?

##########
File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamGraphGeneratorExecutionModeDetectionTest.java
##########
@@ -25,31 +25,109 @@
 import org.apache.flink.api.connector.source.Boundedness;
 import org.apache.flink.api.connector.source.mocks.MockSource;
 import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.execution.JobClient;
 import org.apache.flink.runtime.jobgraph.ScheduleMode;
 import org.apache.flink.streaming.api.RuntimeExecutionMode;
 import org.apache.flink.streaming.api.environment.CheckpointConfig;
+import org.apache.flink.streaming.api.environment.RuntimeOptions;
+import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
 import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
 import org.apache.flink.streaming.api.operators.SourceOperatorFactory;
 import org.apache.flink.streaming.api.transformations.SourceTransformation;
 import org.apache.flink.streaming.api.transformations.TwoInputTransformation;
 import org.apache.flink.util.TestLogger;
 
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
 import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import static org.apache.flink.util.Preconditions.checkNotNull;
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertThat;
 
 /**
  * Tests for the detection of the {@link RuntimeExecutionMode runtime execution mode} during
  * stream graph translation.
  */
 public class StreamGraphGeneratorExecutionModeDetectionTest extends TestLogger {
 
+	@Test
+	public void testExecutionModePropagationFromEnvWithDefaultAndBoundedSource() throws Exception {
+		final StreamExecutionEnvironment environment = new TestExecutionEnvironment(
+				GlobalDataExchangeMode.ALL_EDGES_PIPELINED,
+				ScheduleMode.EAGER,
+				true);
+
+		environment
+				.fromSource(
+						new MockSource(Boundedness.BOUNDED, 100),
+						WatermarkStrategy.noWatermarks(),
+						"bounded-source")
+				.print();
+		environment.executeAsync();

Review comment:
       Can't we do `environment.getStreamGraph` and assert that `StreamGraph`? I find it way easier to figure out what a test verifies if the assertions are part of the test body.




----------------------------------------------------------------
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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709) 
   * 9505ce0cde115c38bedbe911da8053f9bae85aaa Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739) 
   * b28ac93e6454e96ad9179e81ff76b665ea870c81 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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709) 
   * 9505ce0cde115c38bedbe911da8053f9bae85aaa Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739) 
   * b28ac93e6454e96ad9179e81ff76b665ea870c81 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748) 
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RuntimeOptions.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.environment;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+import org.apache.flink.streaming.api.RuntimeExecutionMode;
+
+/**
+ * Execution {@link ConfigOption options} for configuring the runtime behavior of the pipeline.
+ *
+ * @see RuntimeExecutionMode
+ */
+@PublicEvolving
+public class RuntimeOptions {
+
+	public static final ConfigOption<RuntimeExecutionMode> RUNTIME_MODE =
+			ConfigOptions.key("execution.runtime-mode")
+					.enumType(RuntimeExecutionMode.class)

Review comment:
       I missed it is not accessible. Yes, I think `org.apache.flink.api.common` is a good place to put it.




----------------------------------------------------------------
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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/graph/StreamGraphGenerator.java
##########
@@ -244,19 +245,30 @@ private void configureStreamGraph(final StreamGraph graph) {
 	}
 
 	private boolean shouldExecuteInBatchMode(final RuntimeExecutionMode configuredMode) {
+		final boolean existsUnboundedSource = existsContinuousSource();
+
+		if (configuredMode == RuntimeExecutionMode.BATCH && existsUnboundedSource) {

Review comment:
       In similar cases I went with `state` because it is not obvious which `argument` on which method is illegal. Usually I'd use `argument` if it is thrown explicitly from a method that is called by the recipient of the exception. But I do agree the `state` is also not a perfect solution as it is because of a user setting.




----------------------------------------------------------------
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] kl0u closed pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   


----------------------------------------------------------------
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] kl0u commented on pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   Thanks for the review @dawidwys , I integrated the comments.


----------------------------------------------------------------
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] kl0u edited a comment on pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   I thought I did actually but you may be right. I will do it as soon as Azure gives green.


----------------------------------------------------------------
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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709) 
   * 9505ce0cde115c38bedbe911da8053f9bae85aaa 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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   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 cd0aee4f68fdc52fdb9010b6e03b24bca1442654 (Thu Oct 15 19:36:11 UTC 2020)
   
    ✅no warnings
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709) 
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   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 b28ac93e6454e96ad9179e81ff76b665ea870c81 (Fri Oct 16 10:57:31 UTC 2020)
   
   **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] kl0u commented on a change in pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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



##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/RuntimeOptions.java
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.environment;
+
+import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.configuration.ConfigOption;
+import org.apache.flink.configuration.ConfigOptions;
+import org.apache.flink.streaming.api.RuntimeExecutionMode;
+
+/**
+ * Execution {@link ConfigOption options} for configuring the runtime behavior of the pipeline.
+ *
+ * @see RuntimeExecutionMode
+ */
+@PublicEvolving
+public class RuntimeOptions {
+
+	public static final ConfigOption<RuntimeExecutionMode> RUNTIME_MODE =
+			ConfigOptions.key("execution.runtime-mode")
+					.enumType(RuntimeExecutionMode.class)

Review comment:
       I agree with you. I just did not know where to move the `RuntimeExecutionMode` to make it accessible from the `ExecutionOptions `. I will move it to `flink-core` in the `org.apache.flink.api.common`. What do you think?




----------------------------------------------------------------
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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709) 
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759",
       "triggerID" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7765",
       "triggerID" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759) 
   * a9c04a955b538391702fd5407f5261cdb3911ee7 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7765) 
   
   <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] kl0u commented on pull request #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   I thought I did actually but you may be right.


----------------------------------------------------------------
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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759",
       "triggerID" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7765",
       "triggerID" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b28ac93e6454e96ad9179e81ff76b665ea870c81 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748) 
   * 88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759) 
   * a9c04a955b538391702fd5407f5261cdb3911ee7 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7765) 
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759",
       "triggerID" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7765",
       "triggerID" : "a9c04a955b538391702fd5407f5261cdb3911ee7",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a9c04a955b538391702fd5407f5261cdb3911ee7 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7765) 
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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



##########
File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamGraphGeneratorExecutionModeDetectionTest.java
##########
@@ -19,37 +19,129 @@
 package org.apache.flink.streaming.api.graph;
 
 import org.apache.flink.api.common.ExecutionConfig;
+import org.apache.flink.api.common.RuntimeExecutionMode;
 import org.apache.flink.api.common.eventtime.WatermarkStrategy;
 import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
 import org.apache.flink.api.common.typeinfo.IntegerTypeInfo;
 import org.apache.flink.api.connector.source.Boundedness;
 import org.apache.flink.api.connector.source.mocks.MockSource;
 import org.apache.flink.api.dag.Transformation;
+import org.apache.flink.configuration.Configuration;
+import org.apache.flink.configuration.ExecutionOptions;
 import org.apache.flink.runtime.jobgraph.ScheduleMode;
-import org.apache.flink.streaming.api.RuntimeExecutionMode;
 import org.apache.flink.streaming.api.environment.CheckpointConfig;
+import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
 import org.apache.flink.streaming.api.operators.SimpleOperatorFactory;
 import org.apache.flink.streaming.api.operators.SourceOperatorFactory;
 import org.apache.flink.streaming.api.transformations.SourceTransformation;
 import org.apache.flink.streaming.api.transformations.TwoInputTransformation;
 import org.apache.flink.util.TestLogger;
 
+import org.hamcrest.Description;
+import org.hamcrest.TypeSafeMatcher;
 import org.junit.Test;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertThat;
 
 /**
  * Tests for the detection of the {@link RuntimeExecutionMode runtime execution mode} during
  * stream graph translation.
  */
 public class StreamGraphGeneratorExecutionModeDetectionTest extends TestLogger {
 
+	@Test
+	public void testExecutionModePropagationFromEnvWithDefaultAndBoundedSource() {
+		final StreamExecutionEnvironment environment =
+				StreamExecutionEnvironment.getExecutionEnvironment();
+
+		environment
+				.fromSource(
+						new MockSource(Boundedness.BOUNDED, 100),
+						WatermarkStrategy.noWatermarks(),
+						"bounded-source")
+				.print();
+
+		assertThat(
+				environment.getStreamGraph(),
+				hasProperties(
+						GlobalDataExchangeMode.ALL_EDGES_PIPELINED,
+						ScheduleMode.EAGER,
+						true));
+	}
+
+	@Test
+	public void testExecutionModePropagationFromEnvWithDefaultAndUnboundedSource() {
+		final StreamExecutionEnvironment environment =
+				StreamExecutionEnvironment.getExecutionEnvironment();
+
+		environment
+				.fromSource(
+						new MockSource(Boundedness.CONTINUOUS_UNBOUNDED, 100),
+						WatermarkStrategy.noWatermarks(),
+						"unbounded-source")
+				.print();
+
+		assertThat(
+				environment.getStreamGraph(),
+				hasProperties(
+						GlobalDataExchangeMode.ALL_EDGES_PIPELINED,
+						ScheduleMode.EAGER,
+						true));
+	}
+
+	@Test
+	public void testExecutionModePropagationFromEnvWithAutomaticAndBoundedSource() {
+		final Configuration config = new Configuration();
+		config.set(ExecutionOptions.RUNTIME_MODE, RuntimeExecutionMode.AUTOMATIC);
+
+		final StreamExecutionEnvironment environment =
+				StreamExecutionEnvironment.getExecutionEnvironment();
+		environment.configure(config, getClass().getClassLoader());
+
+		environment
+				.fromSource(
+						new MockSource(Boundedness.BOUNDED, 100),
+						WatermarkStrategy.noWatermarks(),
+						"bounded-source")
+				.print();
+
+		assertThat(
+				environment.getStreamGraph(),
+				hasProperties(
+						GlobalDataExchangeMode.POINTWISE_EDGES_PIPELINED,
+						ScheduleMode.LAZY_FROM_SOURCES_WITH_BATCH_SLOT_REQUEST,
+						false));
+	}
+
+	@Test(expected = IllegalStateException.class)

Review comment:
       Maybe using the `ExceptionException` rule would be better here because it's more fine grained and allows matching on the exception message.




----------------------------------------------------------------
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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759",
       "triggerID" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b28ac93e6454e96ad9179e81ff76b665ea870c81 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748) 
   * 88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7759) 
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709) 
   * 9505ce0cde115c38bedbe911da8053f9bae85aaa Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739) 
   
   <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 #13656: [FLINK-19583] Expose the execution.runtime-mode to users

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709",
       "triggerID" : "cd0aee4f68fdc52fdb9010b6e03b24bca1442654",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739",
       "triggerID" : "9505ce0cde115c38bedbe911da8053f9bae85aaa",
       "triggerType" : "PUSH"
     }, {
       "hash" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748",
       "triggerID" : "b28ac93e6454e96ad9179e81ff76b665ea870c81",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * cd0aee4f68fdc52fdb9010b6e03b24bca1442654 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7709) 
   * 9505ce0cde115c38bedbe911da8053f9bae85aaa Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7739) 
   * b28ac93e6454e96ad9179e81ff76b665ea870c81 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=7748) 
   * 88de2aed84b76c5f61d285fd0a1a4f6a9dc8e388 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