Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5448#discussion_r197707880
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java ---
    @@ -148,6 +148,27 @@ public static MemorySize parse(String text) throws 
IllegalArgumentException {
                return new MemorySize(parseBytes(text));
        }
     
    +   /**
    +    * Parses the given string as as MemorySize.
    +    * The supported expressions are listed under {@link MemorySize}.
    +    *
    +    * <p>
    +    * Note : this method is compatible with the old memory config key, 
like {@link TaskManagerOptions#MANAGED_MEMORY_SIZE}.
    +    * </p>
    +    *
    +    * @param text The string to parse.
    +    * @return The parsed MemorySize.
    +    *
    +    * @throws IllegalArgumentException Thrown, if the expression cannot be 
parsed.
    +    */
    +   public static MemorySize parseAsMebiBytesIfNoUnit(String text) throws 
IllegalArgumentException {
    --- End diff --
    
    I think a better idea would be to have `parse(String text, MemoryUnit 
defaultUnit)`


---

Reply via email to