private void validateConfig(Map<String, Map<String, String>> configuration, Stack stack) {
    for (Map.Entry<String, Map<String, String>> each : configuration.entrySet()) {
      validateConfigType(each.getKey(), each.getValue(), 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