Class DefaultBlocklistTracker

java.lang.Object
org.apache.flink.runtime.blocklist.DefaultBlocklistTracker
All Implemented Interfaces:
BlocklistTracker

public class DefaultBlocklistTracker extends Object implements BlocklistTracker
Default implementation of BlocklistTracker.
  • Constructor Details

    • DefaultBlocklistTracker

      public DefaultBlocklistTracker()
  • Method Details

    • addNewBlockedNodes

      public org.apache.flink.runtime.blocklist.BlockedNodeAdditionResult addNewBlockedNodes(Collection<BlockedNode> newNodes)
      Description copied from interface: BlocklistTracker
      Add new blocked node records. If a node (identified by node id) already exists, the newly added one will be merged with the existing one.
      Specified by:
      addNewBlockedNodes in interface BlocklistTracker
      Parameters:
      newNodes - the new blocked node records
      Returns:
      the addition result
    • isBlockedNode

      public boolean isBlockedNode(String nodeId)
      Description copied from interface: BlocklistTracker
      Returns whether the given node is blocked.
      Specified by:
      isBlockedNode in interface BlocklistTracker
      Parameters:
      nodeId - ID of the node to query
      Returns:
      true if the given node is blocked, otherwise false
    • getAllBlockedNodeIds

      public Set<String> getAllBlockedNodeIds()
      Description copied from interface: BlocklistTracker
      Get all blocked node ids.
      Specified by:
      getAllBlockedNodeIds in interface BlocklistTracker
      Returns:
      a set containing all blocked node ids
    • getAllBlockedNodes

      public Collection<BlockedNode> getAllBlockedNodes()
      Description copied from interface: BlocklistTracker
      Get all blocked nodes.
      Specified by:
      getAllBlockedNodes in interface BlocklistTracker
      Returns:
      a collection containing all blocked nodes
    • removeTimeoutNodes

      public Collection<BlockedNode> removeTimeoutNodes(long currentTimestamp)
      Description copied from interface: BlocklistTracker
      Remove timeout nodes.
      Specified by:
      removeTimeoutNodes in interface BlocklistTracker
      Parameters:
      currentTimestamp - current time
      Returns:
      the removed nodes