flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] lqjack commented on a change in pull request #15812: remove slotpoolImpl
Date Tue, 18 May 2021 09:22:10 GMT

lqjack commented on a change in pull request #15812:
URL: https://github.com/apache/flink/pull/15812#discussion_r634201763



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/PhysicalSlotProviderImplWithSpreadOutStrategyTest.java
##########
@@ -48,19 +48,21 @@
     @Test
     public void testSlotAllocationFulfilledWithWorkloadSpreadOut()
             throws InterruptedException, ExecutionException {
+        PhysicalSlotRequest request0 = physicalSlotProviderResource.createSimpleRequest();
+        PhysicalSlotRequest request1 = physicalSlotProviderResource.createSimpleRequest();
+
+        CompletableFuture<PhysicalSlotRequest.Result> resultCompletableFuture0 =
+                physicalSlotProviderResource.allocateSlot(request0);
+        CompletableFuture<PhysicalSlotRequest.Result> resultCompletableFuture1 =
+                physicalSlotProviderResource.allocateSlot(request1);
+
         physicalSlotProviderResource.registerSlotOffersFromNewTaskExecutor(
                 ResourceProfile.ANY, ResourceProfile.ANY, ResourceProfile.ANY, ResourceProfile.ANY);
         physicalSlotProviderResource.registerSlotOffersFromNewTaskExecutor(
                 ResourceProfile.ANY, ResourceProfile.ANY, ResourceProfile.ANY, ResourceProfile.ANY);
 
-        PhysicalSlotRequest request0 = physicalSlotProviderResource.createSimpleRequest();
-        PhysicalSlotRequest request1 = physicalSlotProviderResource.createSimpleRequest();
-
-        PhysicalSlotRequest.Result result0 =
-                physicalSlotProviderResource.allocateSlot(request0).get();
-        PhysicalSlotRequest.Result result1 =
-                physicalSlotProviderResource.allocateSlot(request1).get();
-
+        PhysicalSlotRequest.Result result0 = resultCompletableFuture0.get();
+        PhysicalSlotRequest.Result result1 = resultCompletableFuture1.get();

Review comment:
       when no slotRequest in the slotPool, physicalSlotProviderResource.registerSlotOffersFromNewTaskExecutor
will not insert the resources successful.




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



Mime
View raw message