public void updateHostComponentDesiredState(AddServiceInfo request, Predicate predicate, ProvisionStep step) {
    State desiredState = step.getDesiredStateToSet();
    LOG.info("Updating host component desired state to {} per {} for {}", desiredState, step, request);
    LOG.debug("Using predicate {}", predicate);

    Set<Map<String, Object>> properties = ImmutableSet.of(ImmutableMap.of(
      HostComponentResourceProvider.STATE, desiredState.name(),
      CONTEXT, String.format("Put new components to %s state", desiredState)
    ));

    Map<String, String> requestInfo = new ImmutableMap.Builder<String, String>()
      .putAll(RequestOperationLevel.propertiesFor(Resource.Type.HostComponent, request.clusterName()))
      .putAll(step.getProvisionProperties())
      .build();

    HostComponentResourceProvider rp = (HostComponentResourceProvider) getClusterController().ensureResourceProvider(Resource.Type.HostComponent);
    Request internalRequest = createRequest(properties, requestInfo, null);
    try {
      rp.doUpdateResources(request.getStages(), internalRequest, predicate, false, false, false);
    } catch (UnsupportedPropertyException | SystemException | NoSuchParentResourceException | NoSuchResourceException e) {
      CHECK.wrapInUnchecked(e, RuntimeException::new, "Error updating host component desired state for %s", request);
    }
  }
@return {@code Optional} with the cluster's kerberos descriptor artifact if it exists, otherwise empty {@code Optional}
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/ResourceProviderAdapter.java