private void updateKerberosDescriptor(AddServiceInfo request) {
    request.getKerberosDescriptor().ifPresent(descriptorInRequest -> {
      Optional<KerberosDescriptor> existingDescriptor = resourceProviders.getKerberosDescriptor(request);
      if (existingDescriptor.isPresent()) {
        KerberosDescriptor newDescriptor = existingDescriptor.get().update(descriptorInRequest);
        resourceProviders.updateKerberosDescriptor(request, newDescriptor);
      } else {
        resourceProviders.createKerberosDescriptor(request, descriptorInRequest);
      }
    });
  }
Creates the service, component and host component resources for the request.
ambari-server/src/main/java/org/apache/ambari/server/topology/addservice/AddServiceOrchestrator.java