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

    https://github.com/apache/flink/pull/5448#discussion_r197754848
  
    --- 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 --
    
    @dawidwys there is not a `MemoryUnit` and `parseAsMebiBytesIfNoUnit` just 
for MebiBytes(`taskmanager.memory.size`) so I think we should not make it more 
complex.


---

Reply via email to