public Set<AlertDefinition> getAlertDefinitions(File alertDefinitionFile,
      String serviceName) throws AmbariException {
    try {
      FileReader fileReader = new FileReader(alertDefinitionFile);
      return getAlertDefinitions(fileReader, serviceName);
    } catch (IOException ioe) {
      String message = "Could not read the alert definition file";
      LOG.error(message, ioe);
      throw new AmbariException(message, ioe);
    }
  }
Gets a list of all of the alert definitions defined in the specified JSON
{@link File} for the given service. Each of the JSON files should have a
mapping between the service and the alerts defined for that service. This
is necessary since some services are combined in a single
{@code metainfo.xml} and only have a single directory on the stack.

@param alertDefinitionFile
         the JSON file from the stack to read (not {@code null}).
@param serviceName
         the name of the service to extract definitions for (not
         {@code null}).
@return the definitions for the specified service, or an empty set.
@throws AmbariException
          if there was a problem reading the file or parsing the JSON.
ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java