Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A blocked item corresponds to the blocklist information of a specific task manager or node, including the following 5 6 fields:

  1. type: The blocked item type, TASK_MANAGER or NODE
  2. timestamp: The timestamp for of creating this item, will be used to check timeoutitem.
  3. endTimestamp: The timestamp at which the item should be removed.
  4. cause: The cause for creating this item.
  5. identifier: The identifier of the blocked task manager or node.
  6. action: The action when a task manager/node is marked as blocked, including:MARK_BLOCKED: Just mark the task manager or node as blocked. Future slots should not be allocated from the blocked task manager or node. But slots that are already allocated will not be affected.MARK_BLOCKED_AND_EVACUATE_TASKS: Mark the task manager or node as blocked, and evacuate all tasks on it. Evacuated tasks will be restarted on non-blocked task managers.
Code Block
titleBlocklistedItem
/**
 * This class represents a blocked item.
 *
 * @param <ID> Identifier of the blocked item.
 */
public abstract class BlockedItem<ID> {
    public BlockedItemType getType();

    public long getTimestamp();

    public long getEndTimestamp();
    
    public BlockAction getAction();

    public Throwable getCause();

    public abstract ID getIdentifier();
}

/** This class represents a blocked node. */
public class BlockedNode extends BlockedItem<String> {
}

/** This class represents a blocked task manager. */
public class BlockedTaskManager extends BlockedItem<ResourceID> {
}

...