private static String toJvmUnit(String stackUnit) {
      switch (stackUnit.toLowerCase()) {
        case "mb" : return "m";
        case "gb" : return "g";
        case "b"  :
        case "bytes" : return "";
        default: throw new IllegalArgumentException("Unsupported stack unit: " + stackUnit);
      }
    }
@return property value with removed unit
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UnitUpdater.java