private void validateConfigType(String configType, Map<String, String> config, Stack stack) {
    for (String propertyName : config.keySet()) {
      validateProperty(configType, config, propertyName, stack);
    }
  }
I validate the unit of properties by checking if it matches to the stack defined unit.
Properties with different unit than the stack defined unit are rejected.
ambari-server/src/main/java/org/apache/ambari/server/topology/validators/UnitValidator.java