public void processHeartbeat(HeartBeat heartbeat) throws AmbariException {
    long now = System.currentTimeMillis();

    processAlerts(heartbeat);

    //process status reports before command reports to prevent status override immediately after task finish
    processStatusReports(heartbeat);
    processCommandReports(heartbeat, now);
    //host status calculation are based on task and status reports, should be performed last
    processHostStatus(heartbeat);
  }
Incapsulates logic for processing data from agent heartbeat

@param heartbeat Agent heartbeat object
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java