protected void validateHostPredicateProperties(String predicate) throws InvalidTopologyTemplateException {
    Token[] tokens;
    try {
      tokens = queryLexer.tokens(predicate);
    } catch (InvalidQueryException e) {
      throw new InvalidTopologyTemplateException(
          String.format("The specified host query is invalid: %s", e.getMessage()));
    }

    Set<String> propertyIds = new HashSet<>();
    for (Token token : tokens) {
      if (token.getType() == Token.TYPE.PROPERTY_OPERAND) {
        propertyIds.add(token.getValue());
      }
    }

    Set<String> invalidProperties = ensureHostProvider().checkPropertyIds(propertyIds);
    if (! invalidProperties.isEmpty()) {
      throw new InvalidTopologyTemplateException(String.format(
          "Invalid Host Predicate.  The following properties are not valid for a host predicate: %s",
          invalidProperties));
    }
  }
Validate that all properties specified in the predicate are valid for the Host resource.

@param predicate  predicate to validate

@throws InvalidTopologyTemplateException  if any of the properties specified in the predicate are invalid
                                          for the Host resource type
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BaseClusterRequest.java