private void handleHeartbeatLost(Long hostId) throws AmbariException, InvalidStateTransitionException {
    Host hostObj = clusters.getHostById(hostId);
    String host = hostObj.getHostName();
    LOG.warn("Heartbeat lost from host " + host);
    //Heartbeat is expired
    hostObj.handleEvent(new HostHeartbeatLostEvent(host));

    // mark all components that are not clients with unknown status
    for (Cluster cluster : clusters.getClustersForHost(hostObj.getHostName())) {
      for (ServiceComponentHost sch : cluster.getServiceComponentHosts(hostObj.getHostName())) {
        Service s = cluster.getService(sch.getServiceName());
        ServiceComponent sc = s.getServiceComponent(sch.getServiceComponentName());
        if (!sc.isClientComponent() &&
            !sch.getState().equals(State.INIT) &&
            !sch.getState().equals(State.INSTALLING) &&
            !sch.getState().equals(State.INSTALL_FAILED) &&
            !sch.getState().equals(State.UNINSTALLED) &&
            !sch.getState().equals(State.DISABLED)) {
          LOG.warn("Setting component state to UNKNOWN for component " + sc.getName() + " on " + host);
          State oldState = sch.getState();
          sch.setState(State.UNKNOWN);
        }
      }
    }

    //Purge action queue
    //notify action manager
    actionManager.handleLostHost(host);
  }
Generates status command and fills all appropriate fields.
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatMonitor.java