static String normalizeValue(String templateValue, String newRawValue) {
    if (null == templateValue) {
      return newRawValue;
    }

    Matcher m = HEAP_PATTERN.matcher(templateValue);

    if (m.matches()) {
      return newRawValue + m.group(2);
    }

    return newRawValue;
  }
If template looks like Java heap size, then format raw value to comply
with size unit specified in template
@param templateValue
@param newRawValue
@return raw value formatted like template (if template looks like Java
heap size), raw value as is otherwise.
ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java