public class HeartbeatProcessor
extends com.google.common.util.concurrent.AbstractService
Constructor and Description |
---|
HeartbeatProcessor(Clusters clusterFsm,
ActionManager am,
HeartbeatMonitor heartbeatMonitor,
com.google.inject.Injector injector) |
Modifier and Type | Method and Description |
---|---|
void |
addHeartbeat(HeartBeat heartBeat) |
protected void |
doStart() |
protected void |
doStop() |
protected void |
processAlerts(HeartBeat heartbeat)
Extracts all of the
Alert s from the heartbeat and fires
AlertEvent s for each one. |
void |
processAlerts(String hostname,
List<Alert> alerts) |
protected void |
processCommandReports(HeartBeat heartbeat,
long now)
Process reports of tasks executed on agents
|
protected void |
processCommandReports(List<CommandReport> reports,
String hostName,
Long now) |
void |
processHeartbeat(HeartBeat heartbeat)
Incapsulates logic for processing data from agent heartbeat
|
protected void |
processHostStatus(HeartBeat heartbeat)
Update host status basing on components statuses
|
protected void |
processHostStatus(List<ComponentStatus> componentStatuses,
List<CommandReport> reports,
String hostName) |
protected void |
processStatusReports(HeartBeat heartbeat)
Process reports of status commands
|
void |
processStatusReports(List<ComponentStatus> componentStatuses,
String hostname)
Process reports of status commands
|
void |
processVersionReports(ComponentVersionReports versionReports,
String hostname)
Process reports of components versions
|
@Inject public HeartbeatProcessor(Clusters clusterFsm, ActionManager am, HeartbeatMonitor heartbeatMonitor, com.google.inject.Injector injector)
protected void doStart()
doStart
in class com.google.common.util.concurrent.AbstractService
protected void doStop()
doStop
in class com.google.common.util.concurrent.AbstractService
public void addHeartbeat(HeartBeat heartBeat)
public void processHeartbeat(HeartBeat heartbeat) throws org.apache.ambari.server.AmbariException
heartbeat
- Agent heartbeat objectorg.apache.ambari.server.AmbariException
protected void processAlerts(HeartBeat heartbeat)
Alert
s from the heartbeat and fires
AlertEvent
s for each one. If there is a problem looking up the
cluster, then alerts will not be processed.heartbeat
- the heartbeat to process.protected void processHostStatus(HeartBeat heartbeat) throws org.apache.ambari.server.AmbariException
heartbeat
- heartbeat to processorg.apache.ambari.server.AmbariException
protected void processHostStatus(List<ComponentStatus> componentStatuses, List<CommandReport> reports, String hostName) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected void processCommandReports(HeartBeat heartbeat, long now) throws org.apache.ambari.server.AmbariException
heartbeat
- heartbeat to processnow
- cached current timeorg.apache.ambari.server.AmbariException
protected void processCommandReports(List<CommandReport> reports, String hostName, Long now) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected void processStatusReports(HeartBeat heartbeat) throws org.apache.ambari.server.AmbariException
heartbeat
- heartbeat to processorg.apache.ambari.server.AmbariException
public void processVersionReports(ComponentVersionReports versionReports, String hostname) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
public void processStatusReports(List<ComponentStatus> componentStatuses, String hostname) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
Copyright © 2022 Apache Software Foundation. All rights reserved.