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/22 07:38:55 UTC

[GitHub] [flink] GJL opened a new pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

GJL opened a new pull request #11857:
URL: https://github.com/apache/flink/pull/11857


   ## What is the purpose of the change
   
   *This enables retrieval of pipelined regions via the `SchedulingTopology` interface.*
   
   
   ## Brief change log
   
     - *See commits*
   
   ## Verifying this change
   This change added tests and can be verified as follows:
   
     - *Added unit test `DefaultSchedulingPipelinedRegionTest`*
     - *Added unit tests to `DefaultExecutionTopologyTest`*
   
   
   ## 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] flinkbot edited a comment on pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 153983502e03705fa2496728c1ef76167a6fe68c Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161681085) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143) 
   
   <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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26e21f0a11a465ec44262af83378f9ecea086fa0 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/161389897) Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49) 
   * 60879530c835ce7d70437baea9740bbf914301ee Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161421374) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69) 
   
   <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] zhuzhurk commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       Previously it is INFO level. And I'd still prefer to make it INFO. Regions are basic components now but users can get little information on that at the moment. This log can help to verify if regions are generated as expected, especially there are multiple GlobalDataExchangeModes which can lead to different region building results.
   Also it is a short and one time log so it would not mess up the logs or cause any performance issue.




----------------------------------------------------------------
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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 60879530c835ce7d70437baea9740bbf914301ee Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161421374) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69) 
   * 153983502e03705fa2496728c1ef76167a6fe68c Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161681085) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143) 
   
   <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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/partitionrelease/RegionPartitionReleaseStrategy.java
##########
@@ -41,15 +39,13 @@
 import static org.apache.flink.util.Preconditions.checkState;
 
 /**
- * Releases blocking intermediate result partitions that are incident to a {@link PipelinedRegion},
+ * Releases blocking intermediate result partitions that are incident to a {@link SchedulingPipelinedRegion},
  * as soon as the region's execution vertices are finished.
  */
 public class RegionPartitionReleaseStrategy implements PartitionReleaseStrategy {

Review comment:
       That was a dumb mistake. Should be fixed now.




----------------------------------------------------------------
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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26e21f0a11a465ec44262af83378f9ecea086fa0 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161389897) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49) 
   
   <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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 60879530c835ce7d70437baea9740bbf914301ee Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161421374) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69) 
   
   <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] zhuzhurk commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adapter/DefaultSchedulingPipelinedRegionTest.java
##########
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.flink.runtime.scheduler.adapter;
+
+import org.apache.flink.api.common.InputDependencyConstraint;
+import org.apache.flink.runtime.execution.ExecutionState;
+import org.apache.flink.runtime.executiongraph.ExecutionGraph;
+import org.apache.flink.runtime.executiongraph.ExecutionGraphTestUtils;
+import org.apache.flink.runtime.io.network.partition.ResultPartitionType;
+import org.apache.flink.runtime.jobgraph.DistributionPattern;
+import org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID;
+import org.apache.flink.runtime.jobgraph.JobVertex;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID;
+import org.apache.flink.util.IterableUtils;
+import org.apache.flink.util.TestLogger;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.Iterables;
+
+import org.junit.Test;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+/**
+ * Unit tests for {@link DefaultSchedulingPipelinedRegion}.
+ */
+public class DefaultSchedulingPipelinedRegionTest extends TestLogger {
+
+	@Test
+	public void gettingUnknownVertexThrowsException() {
+		final DefaultSchedulingPipelinedRegion pipelinedRegion = new DefaultSchedulingPipelinedRegion(Collections.emptySet());
+		final ExecutionVertexID unknownVertexId = new ExecutionVertexID(new JobVertexID(), 0);
+		try {
+			pipelinedRegion.getVertex(unknownVertexId);
+			fail("Expected exception not thrown");
+		} catch (IllegalArgumentException e) {
+			assertThat(e.getMessage(), containsString(unknownVertexId + " not found"));
+		}
+	}
+
+	@Test
+	public void returnsVertices() {
+		final DefaultExecutionVertex vertex = new DefaultExecutionVertex(
+			new ExecutionVertexID(new JobVertexID(), 0),
+			Collections.emptyList(),
+			() -> ExecutionState.CREATED,
+			InputDependencyConstraint.ANY);
+
+		final Set<DefaultExecutionVertex> vertices = Collections.singleton(vertex);
+		final DefaultSchedulingPipelinedRegion pipelinedRegion = new DefaultSchedulingPipelinedRegion(vertices);
+		final Iterator<DefaultExecutionVertex> vertexIterator = pipelinedRegion.getVertices().iterator();
+
+		assertThat(vertexIterator.hasNext(), is(true));
+		assertThat(vertexIterator.next(), is(sameInstance(vertex)));
+		assertThat(vertexIterator.hasNext(), is(false));
+	}
+
+	/**
+	 * Tests if the consumed inputs of the pipelined regions are computed
+	 * correctly using the Job graph below.
+	 * <pre>
+	 *          c
+	 *        /  X
+	 * a -+- b   e
+	 *       \  /
+	 *        d
+	 * </pre>
+	 * Pipelined regions: {a}, {b, c, d, e}
+	 */
+	@Test
+	public void returnsIncidentBlockingPartitions() throws Exception {
+		final JobVertex a = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex b = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex c = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex d = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex e = ExecutionGraphTestUtils.createNoOpVertex(1);
+
+		b.connectNewDataSetAsInput(a, DistributionPattern.POINTWISE, ResultPartitionType.BLOCKING);
+		c.connectNewDataSetAsInput(b, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+		d.connectNewDataSetAsInput(b, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+		e.connectNewDataSetAsInput(c, DistributionPattern.POINTWISE, ResultPartitionType.BLOCKING);
+		e.connectNewDataSetAsInput(d, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+
+		final ExecutionGraph simpleTestGraph = ExecutionGraphTestUtils.createSimpleTestGraph(a, b, c, d, e);
+		final DefaultExecutionTopology topology = new DefaultExecutionTopology(simpleTestGraph);
+
+		final DefaultSchedulingPipelinedRegion firstPipelinedRegion = topology.getPipelinedRegionOfVertex(new ExecutionVertexID(a.getID(), 0));
+		final DefaultSchedulingPipelinedRegion secondPipelinedRegion = topology.getPipelinedRegionOfVertex(new ExecutionVertexID(e.getID(), 0));
+
+		final DefaultExecutionVertex vertexB0 = topology.getVertex(new ExecutionVertexID(b.getID(), 0));
+		final IntermediateResultPartitionID b0ConsumedResultPartition = Iterables.getOnlyElement(vertexB0.getConsumedResults()).getId();
+
+		final Set<IntermediateResultPartitionID> secondPipelinedRegionConsumedResults = IterableUtils.toStream(secondPipelinedRegion.getConsumedResults())
+			.map(DefaultResultPartition::getId)
+			.collect(Collectors.toSet());
+
+		assertThat(firstPipelinedRegion.getConsumedResults().iterator().hasNext(), is(false));
+		assertThat(secondPipelinedRegionConsumedResults, contains(b0ConsumedResultPartition));

Review comment:
       Ah, my bad. Always misunderstand this `contains`.




----------------------------------------------------------------
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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adapter/DefaultSchedulingPipelinedRegionTest.java
##########
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.flink.runtime.scheduler.adapter;
+
+import org.apache.flink.api.common.InputDependencyConstraint;
+import org.apache.flink.runtime.execution.ExecutionState;
+import org.apache.flink.runtime.executiongraph.ExecutionGraph;
+import org.apache.flink.runtime.executiongraph.ExecutionGraphTestUtils;
+import org.apache.flink.runtime.io.network.partition.ResultPartitionType;
+import org.apache.flink.runtime.jobgraph.DistributionPattern;
+import org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID;
+import org.apache.flink.runtime.jobgraph.JobVertex;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID;
+import org.apache.flink.util.IterableUtils;
+import org.apache.flink.util.TestLogger;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.Iterables;
+
+import org.junit.Test;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+/**
+ * Unit tests for {@link DefaultSchedulingPipelinedRegion}.
+ */
+public class DefaultSchedulingPipelinedRegionTest extends TestLogger {
+
+	@Test
+	public void gettingUnknownVertexThrowsException() {
+		final DefaultSchedulingPipelinedRegion pipelinedRegion = new DefaultSchedulingPipelinedRegion(Collections.emptySet());
+		final ExecutionVertexID unknownVertexId = new ExecutionVertexID(new JobVertexID(), 0);
+		try {
+			pipelinedRegion.getVertex(unknownVertexId);
+			fail("Expected exception not thrown");
+		} catch (IllegalArgumentException e) {
+			assertThat(e.getMessage(), containsString(unknownVertexId + " not found"));
+		}
+	}
+
+	@Test
+	public void returnsVertices() {
+		final DefaultExecutionVertex vertex = new DefaultExecutionVertex(
+			new ExecutionVertexID(new JobVertexID(), 0),
+			Collections.emptyList(),
+			() -> ExecutionState.CREATED,
+			InputDependencyConstraint.ANY);
+
+		final Set<DefaultExecutionVertex> vertices = Collections.singleton(vertex);
+		final DefaultSchedulingPipelinedRegion pipelinedRegion = new DefaultSchedulingPipelinedRegion(vertices);
+		final Iterator<DefaultExecutionVertex> vertexIterator = pipelinedRegion.getVertices().iterator();
+
+		assertThat(vertexIterator.hasNext(), is(true));
+		assertThat(vertexIterator.next(), is(sameInstance(vertex)));
+		assertThat(vertexIterator.hasNext(), is(false));
+	}
+
+	/**
+	 * Tests if the consumed inputs of the pipelined regions are computed
+	 * correctly using the Job graph below.
+	 * <pre>
+	 *          c
+	 *        /  X
+	 * a -+- b   e
+	 *       \  /
+	 *        d
+	 * </pre>
+	 * Pipelined regions: {a}, {b, c, d, e}
+	 */
+	@Test
+	public void returnsIncidentBlockingPartitions() throws Exception {
+		final JobVertex a = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex b = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex c = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex d = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex e = ExecutionGraphTestUtils.createNoOpVertex(1);
+
+		b.connectNewDataSetAsInput(a, DistributionPattern.POINTWISE, ResultPartitionType.BLOCKING);
+		c.connectNewDataSetAsInput(b, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+		d.connectNewDataSetAsInput(b, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+		e.connectNewDataSetAsInput(c, DistributionPattern.POINTWISE, ResultPartitionType.BLOCKING);
+		e.connectNewDataSetAsInput(d, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+
+		final ExecutionGraph simpleTestGraph = ExecutionGraphTestUtils.createSimpleTestGraph(a, b, c, d, e);
+		final DefaultExecutionTopology topology = new DefaultExecutionTopology(simpleTestGraph);
+
+		final DefaultSchedulingPipelinedRegion firstPipelinedRegion = topology.getPipelinedRegionOfVertex(new ExecutionVertexID(a.getID(), 0));
+		final DefaultSchedulingPipelinedRegion secondPipelinedRegion = topology.getPipelinedRegionOfVertex(new ExecutionVertexID(e.getID(), 0));
+
+		final DefaultExecutionVertex vertexB0 = topology.getVertex(new ExecutionVertexID(b.getID(), 0));
+		final IntermediateResultPartitionID b0ConsumedResultPartition = Iterables.getOnlyElement(vertexB0.getConsumedResults()).getId();
+
+		final Set<IntermediateResultPartitionID> secondPipelinedRegionConsumedResults = IterableUtils.toStream(secondPipelinedRegion.getConsumedResults())
+			.map(DefaultResultPartition::getId)
+			.collect(Collectors.toSet());
+
+		assertThat(firstPipelinedRegion.getConsumedResults().iterator().hasNext(), is(false));
+		assertThat(secondPipelinedRegionConsumedResults, contains(b0ConsumedResultPartition));

Review comment:
       It's already implied:
   > [...] For a positive match, the examined iterable must be of the same length as the number of specified items.




----------------------------------------------------------------
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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 60879530c835ce7d70437baea9740bbf914301ee Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161421374) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69) 
   
   <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 #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 153983502e03705fa2496728c1ef76167a6fe68c Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161681085) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143) 
   * c415daa4c504245a9841985d16469659c23cc62d 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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       Ok makes sense. Changed to info.

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       Ok makes sense. Changed to INFO.




----------------------------------------------------------------
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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26e21f0a11a465ec44262af83378f9ecea086fa0 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161389897) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49) 
   * 60879530c835ce7d70437baea9740bbf914301ee 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 #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161770962",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c415daa4c504245a9841985d16469659c23cc62d Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161770962) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169) 
   
   <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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategyBuildingTest.java
##########
@@ -55,9 +56,9 @@ public void testIndividualVertices() {
 
 		RestartPipelinedRegionFailoverStrategy strategy = new RestartPipelinedRegionFailoverStrategy(topology);
 
-		FailoverRegion r1 = strategy.getFailoverRegion(v1.getId());
-		FailoverRegion r2 = strategy.getFailoverRegion(v2.getId());
-		FailoverRegion r3 = strategy.getFailoverRegion(v3.getId());
+		SchedulingPipelinedRegion r1 = strategy.getFailoverRegion(v1.getId());

Review comment:
       Tests in this file should be migrated to something like `PipelinedRegionComputeUtilTest`




----------------------------------------------------------------
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] zhuzhurk commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       I'd prefer to make it INFO. Regions are basic components now but users can get little information on that.
   And it is a short and one time log so it would not mess up the logs.




----------------------------------------------------------------
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 #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161770962",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fe7adbec36d908997768392271cd159945f7e898",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "fe7adbec36d908997768392271cd159945f7e898",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c415daa4c504245a9841985d16469659c23cc62d Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161770962) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169) 
   * fe7adbec36d908997768392271cd159945f7e898 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] GJL commented on pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   Merging.


----------------------------------------------------------------
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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       Added logging (153983502e03705fa2496728c1ef76167a6fe68c). Wasn't sure about the previous log level. It's on DEBUG level now.




----------------------------------------------------------------
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] zhuzhurk commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       Previously it is INFO level. And I'd still prefer to make it INFO. Regions are basic components now but users can get little information on that at the moment. This log can help to verify if regions are generated as expected.
   Also it is a short and one time log so it would not mess up the logs or cause any performance issue.




----------------------------------------------------------------
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 #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 153983502e03705fa2496728c1ef76167a6fe68c Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161681085) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143) 
   
   <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 #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161770962",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 153983502e03705fa2496728c1ef76167a6fe68c Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161681085) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143) 
   * c415daa4c504245a9841985d16469659c23cc62d Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161770962) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169) 
   
   <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] zhuzhurk commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adapter/DefaultSchedulingPipelinedRegionTest.java
##########
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.flink.runtime.scheduler.adapter;
+
+import org.apache.flink.api.common.InputDependencyConstraint;
+import org.apache.flink.runtime.execution.ExecutionState;
+import org.apache.flink.runtime.executiongraph.ExecutionGraph;
+import org.apache.flink.runtime.executiongraph.ExecutionGraphTestUtils;
+import org.apache.flink.runtime.io.network.partition.ResultPartitionType;
+import org.apache.flink.runtime.jobgraph.DistributionPattern;
+import org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID;
+import org.apache.flink.runtime.jobgraph.JobVertex;
+import org.apache.flink.runtime.jobgraph.JobVertexID;
+import org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID;
+import org.apache.flink.util.IterableUtils;
+import org.apache.flink.util.TestLogger;
+
+import org.apache.flink.shaded.guava18.com.google.common.collect.Iterables;
+
+import org.junit.Test;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.sameInstance;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+/**
+ * Unit tests for {@link DefaultSchedulingPipelinedRegion}.
+ */
+public class DefaultSchedulingPipelinedRegionTest extends TestLogger {
+
+	@Test
+	public void gettingUnknownVertexThrowsException() {
+		final DefaultSchedulingPipelinedRegion pipelinedRegion = new DefaultSchedulingPipelinedRegion(Collections.emptySet());
+		final ExecutionVertexID unknownVertexId = new ExecutionVertexID(new JobVertexID(), 0);
+		try {
+			pipelinedRegion.getVertex(unknownVertexId);
+			fail("Expected exception not thrown");
+		} catch (IllegalArgumentException e) {
+			assertThat(e.getMessage(), containsString(unknownVertexId + " not found"));
+		}
+	}
+
+	@Test
+	public void returnsVertices() {
+		final DefaultExecutionVertex vertex = new DefaultExecutionVertex(
+			new ExecutionVertexID(new JobVertexID(), 0),
+			Collections.emptyList(),
+			() -> ExecutionState.CREATED,
+			InputDependencyConstraint.ANY);
+
+		final Set<DefaultExecutionVertex> vertices = Collections.singleton(vertex);
+		final DefaultSchedulingPipelinedRegion pipelinedRegion = new DefaultSchedulingPipelinedRegion(vertices);
+		final Iterator<DefaultExecutionVertex> vertexIterator = pipelinedRegion.getVertices().iterator();
+
+		assertThat(vertexIterator.hasNext(), is(true));
+		assertThat(vertexIterator.next(), is(sameInstance(vertex)));
+		assertThat(vertexIterator.hasNext(), is(false));
+	}
+
+	/**
+	 * Tests if the consumed inputs of the pipelined regions are computed
+	 * correctly using the Job graph below.
+	 * <pre>
+	 *          c
+	 *        /  X
+	 * a -+- b   e
+	 *       \  /
+	 *        d
+	 * </pre>
+	 * Pipelined regions: {a}, {b, c, d, e}
+	 */
+	@Test
+	public void returnsIncidentBlockingPartitions() throws Exception {
+		final JobVertex a = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex b = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex c = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex d = ExecutionGraphTestUtils.createNoOpVertex(1);
+		final JobVertex e = ExecutionGraphTestUtils.createNoOpVertex(1);
+
+		b.connectNewDataSetAsInput(a, DistributionPattern.POINTWISE, ResultPartitionType.BLOCKING);
+		c.connectNewDataSetAsInput(b, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+		d.connectNewDataSetAsInput(b, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+		e.connectNewDataSetAsInput(c, DistributionPattern.POINTWISE, ResultPartitionType.BLOCKING);
+		e.connectNewDataSetAsInput(d, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED);
+
+		final ExecutionGraph simpleTestGraph = ExecutionGraphTestUtils.createSimpleTestGraph(a, b, c, d, e);
+		final DefaultExecutionTopology topology = new DefaultExecutionTopology(simpleTestGraph);
+
+		final DefaultSchedulingPipelinedRegion firstPipelinedRegion = topology.getPipelinedRegionOfVertex(new ExecutionVertexID(a.getID(), 0));
+		final DefaultSchedulingPipelinedRegion secondPipelinedRegion = topology.getPipelinedRegionOfVertex(new ExecutionVertexID(e.getID(), 0));
+
+		final DefaultExecutionVertex vertexB0 = topology.getVertex(new ExecutionVertexID(b.getID(), 0));
+		final IntermediateResultPartitionID b0ConsumedResultPartition = Iterables.getOnlyElement(vertexB0.getConsumedResults()).getId();
+
+		final Set<IntermediateResultPartitionID> secondPipelinedRegionConsumedResults = IterableUtils.toStream(secondPipelinedRegion.getConsumedResults())
+			.map(DefaultResultPartition::getId)
+			.collect(Collectors.toSet());
+
+		assertThat(firstPipelinedRegion.getConsumedResults().iterator().hasNext(), is(false));
+		assertThat(secondPipelinedRegionConsumedResults, contains(b0ConsumedResultPartition));

Review comment:
       maybe assert equals to verify that the result partition produced by c0 is not a consumed partition of the second region?

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/partitionrelease/RegionPartitionReleaseStrategy.java
##########
@@ -41,15 +39,13 @@
 import static org.apache.flink.util.Preconditions.checkState;
 
 /**
- * Releases blocking intermediate result partitions that are incident to a {@link PipelinedRegion},
+ * Releases blocking intermediate result partitions that are incident to a {@link SchedulingPipelinedRegion},
  * as soon as the region's execution vertices are finished.
  */
 public class RegionPartitionReleaseStrategy implements PartitionReleaseStrategy {

Review comment:
       Nice that it is simplified a lot!

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adapter/DefaultSchedulingPipelinedRegion.java
##########
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.flink.runtime.scheduler.adapter;
+
+import org.apache.flink.runtime.scheduler.strategy.ExecutionVertexID;
+import org.apache.flink.runtime.scheduler.strategy.SchedulingPipelinedRegion;
+import org.apache.flink.util.Preconditions;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Default implementation of {@link SchedulingPipelinedRegion}.
+ */
+public class DefaultSchedulingPipelinedRegion implements SchedulingPipelinedRegion {
+
+	private final Map<ExecutionVertexID, DefaultExecutionVertex> executionVertices;
+
+	private Set<DefaultResultPartition> consumedResults;
+
+	public DefaultSchedulingPipelinedRegion(Set<DefaultExecutionVertex> defaultExecutionVertices) {
+		Preconditions.checkNotNull(defaultExecutionVertices);
+
+		this.executionVertices = new HashMap<>();
+		for (DefaultExecutionVertex executionVertex : defaultExecutionVertices) {
+			this.executionVertices.put(executionVertex.getId(), executionVertex);
+		}
+	}
+
+	@Override
+	public Iterable<DefaultExecutionVertex> getVertices() {
+		return Collections.unmodifiableCollection(executionVertices.values());
+	}
+
+	@Override
+	public DefaultExecutionVertex getVertex(final ExecutionVertexID vertexId) {
+		final DefaultExecutionVertex executionVertex = executionVertices.get(vertexId);
+		if (executionVertex == null) {
+			throw new IllegalArgumentException(String.format(
+				"Execution vertex %s not found in pipelined region",
+				vertexId));
+		}
+		return executionVertex;
+	}
+
+	@Override
+	public Iterable<DefaultResultPartition> getConsumedResults() {
+		if (consumedResults == null) {
+			initializeConsumedResults();
+		}
+		return consumedResults;
+	}
+
+	private void initializeConsumedResults() {
+		Set<DefaultResultPartition> consumedResults = new HashSet<>();

Review comment:
       nit: final

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/partitionrelease/RegionPartitionReleaseStrategy.java
##########
@@ -41,15 +39,13 @@
 import static org.apache.flink.util.Preconditions.checkState;
 
 /**
- * Releases blocking intermediate result partitions that are incident to a {@link PipelinedRegion},
+ * Releases blocking intermediate result partitions that are incident to a {@link SchedulingPipelinedRegion},
  * as soon as the region's execution vertices are finished.
  */
 public class RegionPartitionReleaseStrategy implements PartitionReleaseStrategy {

Review comment:
       But seems the constructor and factory are not reworked to not build regions by themselves?

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       How about adding such logs in DefaultExecutionTopology region building?
   This can be helpful to diagnose whether regions are built as expected. 
   And maybe also one line for region building start so that users can see how much time the region building takes.




----------------------------------------------------------------
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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   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 26e21f0a11a465ec44262af83378f9ecea086fa0 (Wed Apr 22 07:42:00 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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategyBuildingTest.java
##########
@@ -55,9 +56,9 @@ public void testIndividualVertices() {
 
 		RestartPipelinedRegionFailoverStrategy strategy = new RestartPipelinedRegionFailoverStrategy(topology);
 
-		FailoverRegion r1 = strategy.getFailoverRegion(v1.getId());
-		FailoverRegion r2 = strategy.getFailoverRegion(v2.getId());
-		FailoverRegion r3 = strategy.getFailoverRegion(v3.getId());
+		SchedulingPipelinedRegion r1 = strategy.getFailoverRegion(v1.getId());

Review comment:
       As a follow-up issue, tests in this file should be migrated to something like `PipelinedRegionComputeUtilTest`




----------------------------------------------------------------
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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       Makes sense.




----------------------------------------------------------------
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] zhuzhurk commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       I'd prefer to make it INFO. Regions are basic components now but users can get little information on that.
   And it is a short and one time log so it would not mess up the logs or cause any performance issue.




----------------------------------------------------------------
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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 60879530c835ce7d70437baea9740bbf914301ee Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161421374) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69) 
   * 153983502e03705fa2496728c1ef76167a6fe68c 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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "CANCELED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26e21f0a11a465ec44262af83378f9ecea086fa0 Travis: [CANCELED](https://travis-ci.com/github/flink-ci/flink/builds/161389897) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49) 
   * 60879530c835ce7d70437baea9740bbf914301ee Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161421374) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69) 
   
   <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 issue #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 26e21f0a11a465ec44262af83378f9ecea086fa0 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] GJL commented on a change in pull request #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/RestartPipelinedRegionFailoverStrategy.java
##########
@@ -84,34 +77,8 @@ public RestartPipelinedRegionFailoverStrategy(
 		ResultPartitionAvailabilityChecker resultPartitionAvailabilityChecker) {
 
 		this.topology = checkNotNull(topology);
-		this.regions = Collections.newSetFromMap(new IdentityHashMap<>());
-		this.vertexToRegionMap = new HashMap<>();
 		this.resultPartitionAvailabilityChecker = new RegionFailoverResultPartitionAvailabilityChecker(
 			resultPartitionAvailabilityChecker);
-
-		// build regions based on the given topology
-		LOG.info("Start building failover regions.");
-		buildFailoverRegions();
-	}
-	// ------------------------------------------------------------------------
-	//  region building
-	// ------------------------------------------------------------------------
-
-	private void buildFailoverRegions() {
-		final Set<Set<SchedulingExecutionVertex>> distinctRegions =
-			PipelinedRegionComputeUtil.computePipelinedRegions(topology);
-
-		// creating all the failover regions and register them
-		for (Set<SchedulingExecutionVertex> regionVertices : distinctRegions) {
-			LOG.debug("Creating a failover region with {} vertices.", regionVertices.size());
-			final FailoverRegion failoverRegion = new FailoverRegion(regionVertices);
-			regions.add(failoverRegion);
-			for (SchedulingExecutionVertex vertex : regionVertices) {
-				vertexToRegionMap.put(vertex.getId(), failoverRegion);
-			}
-		}
-
-		LOG.info("Created {} failover regions.", regions.size());

Review comment:
       Added logging (153983502e03705fa2496728c1ef76167a6fe68c). Wasn't sure about the previous log level. It's on INFO level now.




----------------------------------------------------------------
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 #11857: [FLINK-17180][runtime] Implement SchedulingPipelinedRegion interface

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=49",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161389897",
       "triggerID" : "26e21f0a11a465ec44262af83378f9ecea086fa0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=69",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "60879530c835ce7d70437baea9740bbf914301ee",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161421374",
       "triggerID" : "60879530c835ce7d70437baea9740bbf914301ee",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=143",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161681085",
       "triggerID" : "153983502e03705fa2496728c1ef76167a6fe68c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "c415daa4c504245a9841985d16469659c23cc62d",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161770962",
       "triggerID" : "c415daa4c504245a9841985d16469659c23cc62d",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fe7adbec36d908997768392271cd159945f7e898",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/github/flink-ci/flink/builds/161815106",
       "triggerID" : "fe7adbec36d908997768392271cd159945f7e898",
       "triggerType" : "PUSH"
     }, {
       "hash" : "fe7adbec36d908997768392271cd159945f7e898",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=199",
       "triggerID" : "fe7adbec36d908997768392271cd159945f7e898",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c415daa4c504245a9841985d16469659c23cc62d Travis: [SUCCESS](https://travis-ci.com/github/flink-ci/flink/builds/161770962) Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=169) 
   * fe7adbec36d908997768392271cd159945f7e898 Travis: [PENDING](https://travis-ci.com/github/flink-ci/flink/builds/161815106) Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=199) 
   
   <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