private HostRequest getRequest(Map<String, Object> properties) {

    if (properties == null) {
      return new HostRequest(null, null);
    }

    HostRequest hostRequest = new HostRequest(
        getHostNameFromProperties(properties),
        (String) properties.get(HOST_CLUSTER_NAME_PROPERTY_ID)
    );
    hostRequest.setPublicHostName((String) properties.get(HOST_PUBLIC_NAME_PROPERTY_ID));

    String rackInfo = (String) ((null != properties.get(HOST_RACK_INFO_PROPERTY_ID))? properties.get(HOST_RACK_INFO_PROPERTY_ID):
            properties.get(RACK_INFO_PROPERTY_ID));

    hostRequest.setRackInfo(rackInfo);
    hostRequest.setBlueprintName((String) properties.get(BLUEPRINT_PROPERTY_ID));
    hostRequest.setHostGroupName((String) properties.get(HOST_GROUP_PROPERTY_ID));

    Object o = properties.get(HOST_MAINTENANCE_STATE_PROPERTY_ID);
    if (null != o) {
      hostRequest.setMaintenanceState(o.toString());
    }

    List<ConfigurationRequest> cr = getConfigurationRequests("Hosts", properties);

    hostRequest.setDesiredConfigs(cr);

    return hostRequest;
  }
Get a host request object from a map of property values.

@param properties  the predicate

@return the component request object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java