@Override
    public void transition(HostImpl host, HostEvent event) {
      HostRegistrationRequestEvent e = (HostRegistrationRequestEvent) event;
      host.updateHost(e);

      String agentVersion = null;
      if (e.agentVersion != null) {
        agentVersion = e.agentVersion.getVersion();
      }
      LOG.info("Received host registration, host="
        + e.hostInfo
        + ", registrationTime=" + e.registrationTime
        + ", agentVersion=" + agentVersion);

      host.clusters.updateHostMappings(host);

      //todo: proper host joined notification
      boolean associatedWithCluster = false;
      try {
        associatedWithCluster = host.clusters.getClustersForHost(host.getPublicHostName()).size() > 0;
      } catch (HostNotFoundException e1) {
        associatedWithCluster = false;
      } catch (AmbariException e1) {
        // only HostNotFoundException is thrown
        LOG.error("Unable to determine the clusters for host", e1);
      }

      host.topologyManager.onHostRegistered(host, associatedWithCluster);

      host.setHealthStatus(new HostHealthStatus(HealthStatus.HEALTHY,
          host.getHealthStatus().getHealthReport()));
      // initialize agent times in the last time to prevent setting registering/heartbeat times for failed registration.
      host.updateHostTimestamps(e);
    }
Used to publish events relating to host CRUD operations.
ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java