flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Till Rohrmann <trohrm...@apache.org>
Subject Re: A Question About Execution Schedule
Date Wed, 19 Aug 2015 07:31:49 GMT
Hi MaGuoWei,

this is not a problem. If you look at the implementation of
SlotAllocationFuture.setFutureAction, you’ll see that the method is
synchronized on a lock which is also used to complete the future.
Furthermore, you’ll see that the slot variable is checked upon setting an
action and if it’s set the action will immediately be executed. Thus, if in
between calls 1 and 2 the future was completed, then the slot variable
would be set and thus also the action would be executed.

Cheers,
Till
​

On Wed, Aug 19, 2015 at 5:45 AM, MaGuoWei <maguowei@outlook.com> wrote:

> Hi,guysThere are some codes in scheduleForExecution Function in
> Execution.java:
>    1.  SlotAllocationFuture future =
> scheduler.scheduleQueued(toSchedule);   2.
> future.setFutureAction(new SlotAllocationFutureAction() {......})
> When scheduler  finds some slot between line1 and line 2 the scheduler
> can't get the future action.
> Please let me know If I am wrong .
> Thanks.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message