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/04/09 12:16:34 UTC

[GitHub] [flink] zhuzhurk opened a new pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

zhuzhurk opened a new pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691
 
 
   ## What is the purpose of the change
   
   This PR notifies all kinds of consumable partitions to SchedulingStrategy. In this way, the LazyFromSourcesSchedulingStrategy can be simplified a lot since it does not need to maintain result status by itself and does not need to be aware of result partition types.
   
   ## Brief change log
   
     - *Notified all kinds of consumable partitions to SchedulingStrategy*
     - *Simplified LazyFromSourcesSchedulingStrategy and InputDependencyConstraintChecker*
   
   
   ## Verifying this change
   
     - *Added unit tests for consumable partition notification*
     - *Updated tests of LazyFromSourcesSchedulingStrategy and InputDependencyConstraintChecker*
   
   ## 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611512672
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159598196",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160185237",
       "triggerID" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7452",
       "triggerID" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2b5a49d43a83928d34d52f5c87b21f2836fb8578 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160185237) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7452) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611512672
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159598196",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 88a83bd6b69d8b9003d5b159d62d73c1ab2156d4 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/159598196) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285) 
   * 2b5a49d43a83928d34d52f5c87b21f2836fb8578 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


With regards,
Apache Git Services

[GitHub] [flink] zhuzhurk closed pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
zhuzhurk closed pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691
 
 
   

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


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#discussion_r406411129
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -527,6 +531,26 @@ private boolean isNotifiable(
 		return false;
 	}
 
+	private void maybeNotifyBlockingPartitionsConsumable(final ExecutionVertexID executionVertexId) {
+		final ExecutionVertex executionVertex = getExecutionVertex(executionVertexId);
+
+		if (executionVertex.getExecutionState() != ExecutionState.FINISHED) {
+			return;
+		}
+
+		final Set<IntermediateResultPartitionID> consumableResultPartitions = new HashSet<>();
+		for (IntermediateResultPartition resultPartition : executionVertex.getProducedPartitions().values()) {
+			if (resultPartition.getResultType().isBlocking() && resultPartition.isConsumable()) {
 
 Review comment:
   We currently define an `IntermediateResultPartition` to be consumable if all of of the partitions in the intermediate result are consumable. I think one of the reasons `LazyFromSourcesSchedulingStrategy` is so bloated, is that we wanted to enable the `SchedulingStrategy` to define consumability. That is, a `SchedulingStrategy` could decide to schedule downstream operators as soon as one partition is finished (instead of waiting for the entire intermediate result). Now my questions are:
   1. Is it already possible to implement the above requirement in Flink, or does something impede us from consuming partitions of an incomplete intermediate result?
   1. How likely is it that we have to implement the above requirement? If we merge this PR and later change the contract of `notifyPartitionConsumable()`, `LazyFromSourcesSchedulingStrategy` will break. Can we postpone the decision whether `LazyFromSourcesSchedulingStrategy` should be simplified?
   1. What should be the behavior for Pipelined Region Scheduling?

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611512672
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159598196",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160185237",
       "triggerID" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7452",
       "triggerID" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 88a83bd6b69d8b9003d5b159d62d73c1ab2156d4 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/159598196) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285) 
   * 2b5a49d43a83928d34d52f5c87b21f2836fb8578 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/160185237) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7452) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611512672
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159598196",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 88a83bd6b69d8b9003d5b159d62d73c1ab2156d4 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/159598196) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#discussion_r406411129
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -527,6 +531,26 @@ private boolean isNotifiable(
 		return false;
 	}
 
+	private void maybeNotifyBlockingPartitionsConsumable(final ExecutionVertexID executionVertexId) {
+		final ExecutionVertex executionVertex = getExecutionVertex(executionVertexId);
+
+		if (executionVertex.getExecutionState() != ExecutionState.FINISHED) {
+			return;
+		}
+
+		final Set<IntermediateResultPartitionID> consumableResultPartitions = new HashSet<>();
+		for (IntermediateResultPartition resultPartition : executionVertex.getProducedPartitions().values()) {
+			if (resultPartition.getResultType().isBlocking() && resultPartition.isConsumable()) {
 
 Review comment:
   We currently define an `IntermediateResultPartition` to be consumable if all of of the partitions in the intermediate result are consumable. I think one of the reasons `LazyFromSourcesSchedulingStrategy` is so bloated, is that we wanted to enable the strategy to (re-)define consumability. That is, a `SchedulingStrategy` could decide to schedule downstream operators as soon as one partition is finished (instead of waiting for the entire intermediate result). Now my questions are:
   1. Is it already possible to implement the above requirement in Flink, or does something impede us from consuming partitions of an incomplete intermediate result?
   1. How likely is it that we have to implement the above requirement? If we merge this PR and later change the contract of `notifyPartitionConsumable()`, `LazyFromSourcesSchedulingStrategy` will break. Can we postpone the decision whether `LazyFromSourcesSchedulingStrategy` should be simplified?
   1. What should be the behavior (consumability of partitions) for Pipelined Region Scheduling?

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611512672
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159598196",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 88a83bd6b69d8b9003d5b159d62d73c1ab2156d4 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/159598196) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611497180
 
 
   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 88a83bd6b69d8b9003d5b159d62d73c1ab2156d4 (Thu Apr 09 12:19:17 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


With regards,
Apache Git Services

[GitHub] [flink] zhuzhurk commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#discussion_r406622356
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -527,6 +531,26 @@ private boolean isNotifiable(
 		return false;
 	}
 
+	private void maybeNotifyBlockingPartitionsConsumable(final ExecutionVertexID executionVertexId) {
+		final ExecutionVertex executionVertex = getExecutionVertex(executionVertexId);
+
+		if (executionVertex.getExecutionState() != ExecutionState.FINISHED) {
+			return;
+		}
+
+		final Set<IntermediateResultPartitionID> consumableResultPartitions = new HashSet<>();
+		for (IntermediateResultPartition resultPartition : executionVertex.getProducedPartitions().values()) {
+			if (resultPartition.getResultType().isBlocking() && resultPartition.isConsumable()) {
 
 Review comment:
   1. I think a blocking partition can be consumed once it finishes. Actually we already refined it like this in Blink. 
       Waiting for the entire intermediate result to finish is not a must. I feel that it was so because Flink had wanted to schedule batch jobs stage by stage, i.e. finish one JobVertex and then schedule the consumers.
   
   2. If later we would redefine blocking partition consumability, I think it's better to do it in SchedulerNG instead of in the SchedulingStrategy. This can make the concept of PIPELINED and BLOCKING much more clear. A PIPELINED result partition mean it can be consumed once any data has been produced inside. A BLOCKING result partition mean it can be consumed after all its data has been produced. The LazyFromSourcesSchedulingStrategy would not break in this way. 
   The LazyFromSourcesSchedulingStrategy tests are really complex at the moment and some tests behave strangely. For example, all pipelined partitions are consumable initially while all blocking partitions are not. It has been a pain each time I had to touch them. So I hope we could simply it earlier.
   
   3. each time a partition becomes consumable, PipelinedRegionSchedulingStrategy finds out all its consumer regions and schedule those whose inputs are all consumable.

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611512672
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7285",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/159598196",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/160185237",
       "triggerID" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "triggerType" : "PUSH"
     }, {
       "hash" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7452",
       "triggerID" : "2b5a49d43a83928d34d52f5c87b21f2836fb8578",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 2b5a49d43a83928d34d52f5c87b21f2836fb8578 Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/160185237) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=7452) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] GJL commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
GJL commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#discussion_r406411129
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -527,6 +531,26 @@ private boolean isNotifiable(
 		return false;
 	}
 
+	private void maybeNotifyBlockingPartitionsConsumable(final ExecutionVertexID executionVertexId) {
+		final ExecutionVertex executionVertex = getExecutionVertex(executionVertexId);
+
+		if (executionVertex.getExecutionState() != ExecutionState.FINISHED) {
+			return;
+		}
+
+		final Set<IntermediateResultPartitionID> consumableResultPartitions = new HashSet<>();
+		for (IntermediateResultPartition resultPartition : executionVertex.getProducedPartitions().values()) {
+			if (resultPartition.getResultType().isBlocking() && resultPartition.isConsumable()) {
 
 Review comment:
   We currently define an `IntermediateResultPartition` to be consumable if all of of the partitions in the intermediate result are consumable. I think one of the reasons `LazyFromSourcesSchedulingStrategy` is so bloated, is that we wanted to enable the `SchedulingStrategy` to define consumability. That is, a `SchedulingStrategy` could decide to schedule downstream operators as soon as one partition is finished (instead of waiting for the entire intermediate result). Now my questions are:
   1. Is it already possible to implement the above requirement in Flink, or does something impede us from consuming partitions of an incomplete intermediate result?
   1. How likely is it that we have to implement the above requirement? If we merge this PR and later change the contract of `notifyPartitionConsumable()`, `LazyFromSourcesSchedulingStrategy` will break. Can we postpone the decision whether to simplify `LazyFromSourcesSchedulingStrategy`?
   1. What should be the behavior for Pipelined Region Scheduling?

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


With regards,
Apache Git Services

[GitHub] [flink] zhuzhurk commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on a change in pull request #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#discussion_r406622356
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 ##########
 @@ -527,6 +531,26 @@ private boolean isNotifiable(
 		return false;
 	}
 
+	private void maybeNotifyBlockingPartitionsConsumable(final ExecutionVertexID executionVertexId) {
+		final ExecutionVertex executionVertex = getExecutionVertex(executionVertexId);
+
+		if (executionVertex.getExecutionState() != ExecutionState.FINISHED) {
+			return;
+		}
+
+		final Set<IntermediateResultPartitionID> consumableResultPartitions = new HashSet<>();
+		for (IntermediateResultPartition resultPartition : executionVertex.getProducedPartitions().values()) {
+			if (resultPartition.getResultType().isBlocking() && resultPartition.isConsumable()) {
 
 Review comment:
   1. I think a blocking partition can be consumed once it finishes. Actually we already refined it like this in Blink. 
       Waiting for the entire intermediate result to finish is not a must. I feel that it was so because Flink had wanted to schedule batch jobs stage by stage, i.e. finish one JobVertex and then schedule its consumer JobVertex.
   
   2. If later we would redefine blocking partition consumability, I think it's better to do it in SchedulerNG instead of in the SchedulingStrategy. This can make the concept of PIPELINED and BLOCKING much more clear. A PIPELINED result partition mean it can be consumed once any data has been produced inside. A BLOCKING result partition mean it can be consumed after all its data has been produced. The LazyFromSourcesSchedulingStrategy would not break in this way. 
   The LazyFromSourcesSchedulingStrategy tests are really complex at the moment and some tests behave strangely. For example, all pipelined partitions are consumable initially while all blocking partitions are not. It has been a pain each time I had to touch them. So I hope we could simply it earlier.
   
   3. each time a partition becomes consumable, PipelinedRegionSchedulingStrategy finds out all its consumer regions and schedule those whose inputs are all consumable.

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


With regards,
Apache Git Services

[GitHub] [flink] zhuzhurk commented on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
zhuzhurk commented on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-614451290
 
 
   closing since this change is not a must at the moment

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611497180
 
 
   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 2b5a49d43a83928d34d52f5c87b21f2836fb8578 (Wed Apr 15 11:39:56 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11691: [FLINK-14234][runtime] Notifies all kinds of consumable partitions to SchedulingStrategy
URL: https://github.com/apache/flink/pull/11691#issuecomment-611512672
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "88a83bd6b69d8b9003d5b159d62d73c1ab2156d4",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 88a83bd6b69d8b9003d5b159d62d73c1ab2156d4 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


With regards,
Apache Git Services