KerberosDescriptor readKerberosDescriptorFromFile(String fileLocation) throws AmbariException {
    if (!StringUtils.isEmpty(fileLocation)) {
      File file = new File(fileLocation);

      if (file.canRead()) {
        try {
          return kerberosDescriptorFactory.createInstance(file);
        } catch (IOException e) {
          throw new AmbariException(String.format("Failed to parse Kerberos descriptor file %s",
              file.getAbsolutePath()), e);
        }
      } else {
        throw new AmbariException(String.format("Unable to read Kerberos descriptor file %s",
            file.getAbsolutePath()));
      }
    } else {
      LOG.debug("Missing path to Kerberos descriptor, returning null");
    }

    return null;
  }
Reads a Kerberos descriptor from the specified file path.

@param fileLocation the path to the file
@return a KerberosDescriptor or <code>null</code>, if no path is specified
@throws AmbariException if an error occurs reading or parsing the Kerberos descriptor file
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java