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.BlockedNodeAdditionResult
addNewBlockedNodes(Collection<BlockedNode> newNodes)
Add new blocked node records.Set<String>
getAllBlockedNodeIds()
Get all blocked node ids.Collection<BlockedNode>
getAllBlockedNodes()
Get all blocked nodes.boolean
isBlockedNode(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: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 interfaceBlocklistTracker
- 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 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:BlocklistTracker
Get all blocked node ids.- Specified by:
getAllBlockedNodeIds
in interfaceBlocklistTracker
- 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 interfaceBlocklistTracker
- 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 interfaceBlocklistTracker
- Parameters:
currentTimestamp
- current time- Returns:
- the removed nodes
-
-