mirror of https://github.com/apache/nifi.git
NIFI-3933:
- When monitoring heartbeats use the connected nodes as the basis for the check. This addresses the case when a node is terminated and no corresponding heartbeats exist. This closes #1838.
This commit is contained in:
parent
d33c4c72d4
commit
ded396f0ef
|
@ -58,13 +58,6 @@ public interface HeartbeatMonitor {
|
||||||
*/
|
*/
|
||||||
void purgeHeartbeats();
|
void purgeHeartbeats();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns when the heartbeats were purged last.
|
|
||||||
*
|
|
||||||
* @return when the heartbeats were purged last
|
|
||||||
*/
|
|
||||||
long getPurgeTimestamp();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the address that heartbeats should be sent to when this node is elected coordinator.
|
* @return the address that heartbeats should be sent to when this node is elected coordinator.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -281,6 +281,13 @@ public abstract class AbstractHeartbeatMonitor implements HeartbeatMonitor {
|
||||||
*/
|
*/
|
||||||
protected abstract Map<NodeIdentifier, NodeHeartbeat> getLatestHeartbeats();
|
protected abstract Map<NodeIdentifier, NodeHeartbeat> getLatestHeartbeats();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns when the heartbeats were purged last.
|
||||||
|
*
|
||||||
|
* @return when the heartbeats were purged last
|
||||||
|
*/
|
||||||
|
protected abstract long getPurgeTimestamp();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method does nothing in the abstract class but is meant for
|
* This method does nothing in the abstract class but is meant for
|
||||||
* subclasses to override in order to provide functionality when the monitor
|
* subclasses to override in order to provide functionality when the monitor
|
||||||
|
|
Loading…
Reference in New Issue