private Set<String> getHostComponents(Request request) {
    Set<String> components = new HashSet<>();
    NamedPropertySet propertySet = Iterables.getFirst(request.getBody().getNamedPropertySets(), null);
    if (propertySet != null && propertySet.getProperties().get("host_components") instanceof Set) {
      Set<Map<String, String>> set = (Set<Map<String, String>>) propertySet.getProperties().get("host_components");
      if (set != null && !set.isEmpty()) {
        for(Map<String, String> element : set) {
          components.add(element.get(HostComponentResourceProvider.COMPONENT_NAME));
        }
      }
    }
    return components;
  }
Returns component name from the request
@param request
@return
ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/HostEventCreator.java