[GitHub] [flink] TisonKun commented on a change in pull request #10048: [FLINK-14462][coordination] Remove JobGraph#allowQueuedScheduling flag because it is always true

2019-11-03 Thread GitBox
TisonKun commented on a change in pull request #10048: 
[FLINK-14462][coordination] Remove JobGraph#allowQueuedScheduling flag because 
it is always true
URL: https://github.com/apache/flink/pull/10048#discussion_r341891476
 
 

 ##
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/SchedulerIsolatedTasksTest.java
 ##
 @@ -212,14 +154,12 @@ public void testScheduleWithDyingInstances() throws 
Exception {
 
// cannot get another slot, since all instances are dead
try {
-   testingSlotProvider.allocateSlot(new 
ScheduledUnit(getDummyTask()), false, SlotProfile.noRequirements(), 
TestingUtils.infiniteTime()).get();
+   testingSlotProvider
+   .allocateSlot(new 
ScheduledUnit(getDummyTask()), SlotProfile.noRequirements(), 
TestingUtils.infiniteTime())
+   .get(2000L, TimeUnit.MILLISECONDS);
 
 Review comment:
   I verify with the diff below
   
   ```diff
   @@ -155,11 +155,11 @@ public class SchedulerIsolatedTasksTest extends 
SchedulerTestBase {
   // cannot get another slot, since all instances are dead
   try {
   testingSlotProvider
   -   .allocateSlot(new 
ScheduledUnit(getDummyTask()), SlotProfile.noRequirements(), 
TestingUtils.infiniteTime())
   -   .get(2000L, TimeUnit.MILLISECONDS);
   +   .allocateSlot(new 
ScheduledUnit(getDummyTask()), SlotProfile.noRequirements(), 
Time.milliseconds(0L))
   +   .get();
   fail("Scheduler served a slot from a dead instance");
   -   } catch (TimeoutException e) {
   -   // expected
   +   } catch (Exception e) {
   +   assertTrue(e.getCause() instanceof TimeoutException);
   }

   // now the latest, the scheduler should have noticed 
(through the lazy mechanisms)
   ```
   
   However, due to we `get` in main thread and schedule timeout future in main 
thread, we dead lock by main thread itself...Maybe we introduce a new test with 
`ComponentMainThreadExecutorServiceAdapter.forSingleThreadExecutor`. I will 
appreciate it if you can help port this test.


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:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] [flink] TisonKun commented on a change in pull request #10048: [FLINK-14462][coordination] Remove JobGraph#allowQueuedScheduling flag because it is always true

2019-10-30 Thread GitBox
TisonKun commented on a change in pull request #10048: 
[FLINK-14462][coordination] Remove JobGraph#allowQueuedScheduling flag because 
it is always true
URL: https://github.com/apache/flink/pull/10048#discussion_r340927381
 
 

 ##
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphDeploymentTest.java
 ##
 @@ -361,7 +357,7 @@ public void testAccumulatorsAndMetricsForwarding() throws 
Exception {
}
 
/**
-* Verifies that {@link Execution#completeCancelling(Map, IOMetrics)} 
and {@link Execution#markFailed(Throwable, Map, IOMetrics)}
+* Verifies that {@code Execution#completeCancelling(Map, IOMetrics)} 
and {@link Execution#markFailed(Throwable, Map, IOMetrics)}
 
 Review comment:
   Thanks! Updated.


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:
us...@infra.apache.org


With regards,
Apache Git Services