private Map<String, Object> getServiceDescriptor(
      String stackName, String stackVersion, String serviceName) throws NoSuchParentResourceException, IOException {

    AmbariManagementController controller = getManagementController();

    ServiceInfo serviceInfo;
    try {
      serviceInfo = controller.getAmbariMetaInfo().getService(stackName, stackVersion, serviceName);
    } catch (StackAccessException e) {
      throw new NoSuchParentResourceException(String.format(
          "Parent stack/service resource doesn't exist: stackName='%s', stackVersion='%s', serviceName='%s'",
          stackName, stackVersion, serviceName));
    }
    File kerberosFile = serviceInfo.getKerberosDescriptorFile();

    if (kerberosFile != null) {
      KerberosServiceDescriptor serviceDescriptor =
          kerberosServiceDescriptorFactory.createInstance(kerberosFile, serviceName);

      if (serviceDescriptor != null) {
        return serviceDescriptor.toMap();
      }
    }
    return null;
  }
Get the kerberos descriptor for the specified stack service.

@param stackName     stack name
@param stackVersion  stack version
@param serviceName   service name

@return map of kerberos descriptor data or null if no descriptor exists

@throws IOException if unable to read or parse the kerberos descriptor file
@throws NoSuchParentResourceException if the parent stack or stack service doesn't exist
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java