spuru9 commented on code in PR #28478:
URL: https://github.com/apache/flink/pull/28478#discussion_r3437964006
##########
flink-core-api/src/main/java/org/apache/flink/configuration/MemorySize.java:
##########
@@ -56,6 +57,8 @@ public class MemorySize implements java.io.Serializable,
Comparable<MemorySize>
private static final List<MemoryUnit> ORDERED_UNITS =
Arrays.asList(BYTES, KILO_BYTES, MEGA_BYTES, GIGA_BYTES,
TERA_BYTES);
+ private static final Pattern MEMORY_SIZE_FORMAT =
Pattern.compile("\\d+\\s*[a-zA-Z]*");
Review Comment:
In the current implementation the unit can be passed as any gebbrish value.
Some sort of check on unit if present would help I believe, can you take a look
at the stale PR on this https://github.com/apache/flink/pull/27056/changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]