Class DefaultBlocklistTracker
- java.lang.Object
-
- org.apache.flink.runtime.blocklist.DefaultBlocklistTracker
-
- All Implemented Interfaces:
BlocklistTracker
public class DefaultBlocklistTracker extends Object implements BlocklistTracker
Default implementation ofBlocklistTracker.
-
-
Constructor Summary
Constructors Constructor Description DefaultBlocklistTracker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.runtime.blocklist.BlockedNodeAdditionResultaddNewBlockedNodes(Collection<BlockedNode> newNodes)Add new blocked node records.Set<String>getAllBlockedNodeIds()Get all blocked node ids.Collection<BlockedNode>getAllBlockedNodes()Get all blocked nodes.booleanisBlockedNode(String nodeId)Returns whether the given node is blocked.Collection<BlockedNode>removeTimeoutNodes(long currentTimestamp)Remove timeout nodes.
-
-
-
Method Detail
-
addNewBlockedNodes
public org.apache.flink.runtime.blocklist.BlockedNodeAdditionResult addNewBlockedNodes(Collection<BlockedNode> newNodes)
Description copied from interface:BlocklistTrackerAdd 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:
addNewBlockedNodesin interfaceBlocklistTracker- Parameters:
newNodes- the new blocked node records- Returns:
- the addition result
-
isBlockedNode
public boolean isBlockedNode(String nodeId)
Description copied from interface:BlocklistTrackerReturns whether the given node is blocked.- Specified by:
isBlockedNodein interfaceBlocklistTracker- 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:BlocklistTrackerGet all blocked node ids.- Specified by:
getAllBlockedNodeIdsin interfaceBlocklistTracker- Returns:
- a set containing all blocked node ids
-
getAllBlockedNodes
public Collection<BlockedNode> getAllBlockedNodes()
Description copied from interface:BlocklistTrackerGet all blocked nodes.- Specified by:
getAllBlockedNodesin interfaceBlocklistTracker- Returns:
- a collection containing all blocked nodes
-
removeTimeoutNodes
public Collection<BlockedNode> removeTimeoutNodes(long currentTimestamp)
Description copied from interface:BlocklistTrackerRemove timeout nodes.- Specified by:
removeTimeoutNodesin interfaceBlocklistTracker- Parameters:
currentTimestamp- current time- Returns:
- the removed nodes
-
-