GitHub user tillrohrmann opened a pull request:

    [FLINK-4489] [tm] Add TaskSlotTable to manage slot allocations for multiple 
job managers

    The PR introduces the `TaskSlotTable` which manages multiple `TaskSlots`. 
Each `TaskSlot` can be allocated for a different job and only contains tasks 
belonging to this specific job. A `TaskSlot` has the following states:
    - Free - The slot is empty and not allocated to a job
    - Releasing - The slot is about to be freed after it has become empty.
    - Allocated - The slot has been allocated for a job.
    - Active - The slot is in active use by a job manager which is the leader 
of the allocating job.
    A task slot can only be allocated if it is in state free. An allocated task 
slot can transition to state active.
    An active slot allows to add tasks from the respective job and with the 
correct allocation id. An active slot can be marked as inactive which sets the 
state back to allocated.
    An allocated or active slot can only be freed if it is empty. If it is not 
empty, then it's state can be set to releasing indicating that it can be freed 
once it becomes empty.
    The `TaskSlotTable` is responsible for maintaining the slots and trigger a 
timeout if the slots stayed too long in the state Allocated but not Active. 
Upon timeout, the slots will be returned to the `ResourceManager`.
    The job leader retrieval and the offering of the allocated slots specific 
to a job will be covered in a follow up PR.

You can merge this pull request into a Git repository by running:

    $ git pull slotAllocationTable

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2638
commit 6800ffead2cac80e6914ff4f99c6775e3bdd6ad4
Author: Till Rohrmann <>
Date:   2016-10-05T09:58:26Z

    [FLINK-4489] [tm] Add TaskSlotTable to manage slot allocations for multiple 
job managers
    Add TimerService for slot timeouts
    Add task and task slot access methods
    Add comments to newly introduced classes


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

Reply via email to