public class TimeOutWorkerHeartbeatsRecoveryStrategy extends Object implements IWorkerHeartbeatsRecoveryStrategy
1: When nimbus gains leader ship, it will decide if the heartbeats are ready based on the reported node ids, supervisors/nodes will take care of the worker heartbeats recovery, a reported node id means all the workers heartbeats on the node are reported.
2: If several supervisor also crush and will never recover[or all crush for some unknown reason], workers will report their heartbeats directly to master, so it has not any effect.
| Constructor and Description |
|---|
TimeOutWorkerHeartbeatsRecoveryStrategy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isReady(Set<String> nodeIds)
Function to decide if the heartbeats is ready.
|
void |
prepare(Map conf)
Function to prepare the strategy.
|
void |
reportNodeId(String nodeId)
report the node id to this strategy to help to decide
isReady. |
public TimeOutWorkerHeartbeatsRecoveryStrategy()
public void prepare(Map conf)
IWorkerHeartbeatsRecoveryStrategyprepare in interface IWorkerHeartbeatsRecoveryStrategyconf - configpublic boolean isReady(Set<String> nodeIds)
IWorkerHeartbeatsRecoveryStrategyisReady in interface IWorkerHeartbeatsRecoveryStrategynodeIds - all the node ids from current physical plan[assignments], read from ClusterStatepublic void reportNodeId(String nodeId)
IWorkerHeartbeatsRecoveryStrategyisReady.reportNodeId in interface IWorkerHeartbeatsRecoveryStrategynodeId - the node id from reported SupervisorWorkerHeartbeatsCopyright © 2023 The Apache Software Foundation. All rights reserved.