XComp commented on a change in pull request #14220:
URL: https://github.com/apache/flink/pull/14220#discussion_r531152212



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/ClusterConfigurationInfo.java
##########
@@ -45,10 +59,19 @@ public static ClusterConfigurationInfo from(Configuration 
config) {
                final Map<String, String> 
configurationWithHiddenSensitiveValues = 
ConfigurationUtils.hideSensitiveValues(config.toMap());
 
                for (Map.Entry<String, String> keyValuePair : 
configurationWithHiddenSensitiveValues.entrySet()) {
-                       clusterConfig.add(new 
ClusterConfigurationInfoEntry(keyValuePair.getKey(), keyValuePair.getValue()));
+                       
clusterConfig.add(createClusterConfigurationInfoEntry(keyValuePair.getKey(), 
keyValuePair.getValue()));
                }
 
                return clusterConfig;
        }
 
+       @VisibleForTesting
+       static ClusterConfigurationInfoEntry<?> 
createClusterConfigurationInfoEntry(String key, String valueStr) {
+               if (MEMORY_OPTION_KEYS.contains(key)) {
+                       return new ClusterConfigurationInfoEntry<>(key, 
MemorySize.parse(valueStr).getBytes());
+               } else {
+                       return new ClusterConfigurationInfoEntry<>(key, 
valueStr);
+               }

Review comment:
       hm, thinking about it - is there a usecase for the `jobmanager/config` 
endpoint? ...since we're misusing it right now already by injecting the memory 
configuration and the `web.url` which are not set by the user but Flink itself.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to