You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/10/26 09:57:52 UTC

[GitHub] [flink] zentol opened a new pull request #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

zentol opened a new pull request #13792:
URL: https://github.com/apache/flink/pull/13792


   Add a component for managing the connection to the resource manager and declaring resource requirements.
   
   Also adjusts `ManuallyTriggeredScheduledExecutor#triggerNonPeriodicScheduledTasks` to run non-periodic tasks that were scheduled by a previously run non-periodic task.


----------------------------------------------------------------
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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 922d6c3d9bafee2a83a06960b1a20dad58fdb0f2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288) 
   * 0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3 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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 922d6c3d9bafee2a83a06960b1a20dad58fdb0f2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   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 922d6c3d9bafee2a83a06960b1a20dad58fdb0f2 (Mon Oct 26 10:00:23 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] flinkbot edited a comment on pull request #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889",
       "triggerID" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296) 
   * a47fbcb20c1fe2046967441e34320c163d83242f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889) 
   
   <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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889",
       "triggerID" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8922",
       "triggerID" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a47fbcb20c1fe2046967441e34320c163d83242f Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889) 
   * 7b697317d44c217b22d491eeb2727c01fe7fa757 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8922) 
   
   <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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889",
       "triggerID" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296) 
   * a47fbcb20c1fe2046967441e34320c163d83242f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889) 
   * 7b697317d44c217b22d491eeb2727c01fe7fa757 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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296) 
   
   <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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 922d6c3d9bafee2a83a06960b1a20dad58fdb0f2 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288) 
   * 0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296) 
   
   <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] tillrohrmann commented on a change in pull request #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DefaultDeclareResourceRequirementServiceConnectionManager.java
##########
@@ -0,0 +1,106 @@
+/*
+ * 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.jobmaster.slotpool;
+
+import org.apache.flink.runtime.concurrent.ExponentialBackoffRetryStrategy;
+import org.apache.flink.runtime.concurrent.FutureUtils;
+import org.apache.flink.runtime.concurrent.ScheduledExecutor;
+import org.apache.flink.runtime.messages.Acknowledge;
+import org.apache.flink.runtime.slots.ResourceRequirements;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.GuardedBy;
+
+import java.time.Duration;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.CompletableFuture;
+
+/**
+ * Default implementation of {@link DeclareResourceRequirementServiceConnectionManager}.
+ *
+ * <p>This connection manager is responsible for sending new
+ * resource requirements to the connected service. In case of faults it continues
+ * retrying to send the latest resource requirements to the service with
+ * an exponential backoff strategy.
+ */
+class DefaultDeclareResourceRequirementServiceConnectionManager
+		extends AbstractServiceConnectionManager<DeclareResourceRequirementServiceConnectionManager.DeclareResourceRequirementsService>
+		implements DeclareResourceRequirementServiceConnectionManager {
+
+	private static final Logger LOG = LoggerFactory.getLogger(DefaultDeclareResourceRequirementServiceConnectionManager.class);
+
+	private final ScheduledExecutor scheduledExecutor;
+
+	@Nullable
+	@GuardedBy("lock")
+	private ResourceRequirements currentResourceRequirements;
+
+	private DefaultDeclareResourceRequirementServiceConnectionManager(ScheduledExecutor scheduledExecutor) {
+		this.scheduledExecutor = scheduledExecutor;
+	}
+
+	@Override
+	public void declareResourceRequirements(ResourceRequirements resourceRequirements) {
+		synchronized (lock) {
+			checkNotClosed();
+			if (isConnected()) {
+				currentResourceRequirements = resourceRequirements;
+
+				triggerResourceRequirementsSubmission(Duration.ofMillis(1L), Duration.ofMillis(10000L), currentResourceRequirements);
+			}
+		}
+	}
+
+	@GuardedBy("lock")
+	private void triggerResourceRequirementsSubmission(
+			Duration sleepOnError,
+			Duration maxSleepOnError,
+			ResourceRequirements resourceRequirementsToSend) {
+
+		FutureUtils.retryWithDelay(
+				() -> sendResourceRequirements(resourceRequirementsToSend),
+				new ExponentialBackoffRetryStrategy(Integer.MAX_VALUE, sleepOnError, maxSleepOnError),
+				throwable -> !(throwable instanceof CancellationException),
+				scheduledExecutor);
+	}
+
+	@GuardedBy("lock")

Review comment:
       I think this annotation is wrong. `sendResourceRequirements` is not be guarded by `lock`. See `FutureUtils.retryWithDelay(() -> sendResourceRequirements,....)`.

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/AbstractServiceConnectionManagerTest.java
##########
@@ -0,0 +1,70 @@
+/*
+ * 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.jobmaster.slotpool;
+
+import org.apache.flink.util.TestLogger;
+
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Tests for the {@link DefaultDeclareResourceRequirementServiceConnectionManager}.
+ */
+public class AbstractServiceConnectionManagerTest extends TestLogger {
+
+	@Test
+	public void testIsConnected() {
+		AbstractServiceConnectionManager<Object> connectionManager = new TestServiceConnectionManager();
+
+		assertThat(connectionManager.isConnected(), is(false));
+
+		connectionManager.connect(new Object());
+		assertThat(connectionManager.isConnected(), is(true));
+
+		connectionManager.disconnect();
+		assertThat(connectionManager.isConnected(), is(false));
+
+		connectionManager.close();
+		assertThat(connectionManager.isConnected(), is(false));
+	}
+
+	@Test
+	public void testCheckNotClosed() {
+		AbstractServiceConnectionManager<Object> connectionManager = new TestServiceConnectionManager();
+
+		connectionManager.checkNotClosed();
+
+		connectionManager.connect(new Object());
+		connectionManager.checkNotClosed();
+
+		connectionManager.disconnect();
+		connectionManager.checkNotClosed();
+
+		connectionManager.close();
+		try {
+			connectionManager.checkNotClosed();

Review comment:
       `fail` is missing here.




----------------------------------------------------------------
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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889",
       "triggerID" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8922",
       "triggerID" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296) 
   * a47fbcb20c1fe2046967441e34320c163d83242f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889) 
   * 7b697317d44c217b22d491eeb2727c01fe7fa757 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8922) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 922d6c3d9bafee2a83a06960b1a20dad58fdb0f2 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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8889",
       "triggerID" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8922",
       "triggerID" : "7b697317d44c217b22d491eeb2727c01fe7fa757",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7b697317d44c217b22d491eeb2727c01fe7fa757 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8922) 
   
   <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 #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8288",
       "triggerID" : "922d6c3d9bafee2a83a06960b1a20dad58fdb0f2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296",
       "triggerID" : "0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a47fbcb20c1fe2046967441e34320c163d83242f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0a46db4c9e8a9f0d1d5185b353c21aa7c1cd28e3 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=8296) 
   * a47fbcb20c1fe2046967441e34320c163d83242f 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] zentol merged pull request #13792: [FLINK-19809][coordination] Add DeclareResourceRequirementServiceConnectionManager

Posted by GitBox <gi...@apache.org>.
zentol merged pull request #13792:
URL: https://github.com/apache/flink/pull/13792


   


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