tombentley commented on a change in pull request #8222: URL: https://github.com/apache/kafka/pull/8222#discussion_r411295815
########## File path: clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java ########## @@ -1179,6 +1186,50 @@ protected String getConfigValue(ConfigKey key, String headerName) { } } + private static String niceMemoryUnits(ConfigKey key) { + final long defaultValueBytes = ((Number) key.defaultValue).longValue(); + long defaultValue = defaultValueBytes; + int i = 0; + while (i < 5) { + if (defaultValue % 1024 != 0) { + break; + } + defaultValue /= 1024; + i++; + } + switch (i) { + case 1: + return " (=" + defaultValue + "KiB)"; Review comment: You're right, but in this case we're dealing with kibibytes, not kilobyes, and [it seems](https://en.wikipedia.org/wiki/Kibibyte) in this case KiB is the standard abbreviation. ---------------------------------------------------------------- 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: us...@infra.apache.org