advancedxy commented on code in PR #2113:
URL:
https://github.com/apache/incubator-uniffle/pull/2113#discussion_r1764318743
##########
server/src/main/java/org/apache/uniffle/server/ShuffleServer.java:
##########
@@ -321,27 +321,22 @@ private void initialization() throws Exception {
shuffleMergeManager);
shuffleTaskManager.start();
ShuffleServerMetrics.addLabeledGauge(
- USED_DIRECT_MEMORY_SIZE_BY_NETTY, () -> (double)
PlatformDependent.usedDirectMemory());
+ USED_DIRECT_MEMORY_SIZE_BY_NETTY, PlatformDependent::usedDirectMemory);
Review Comment:
👍 .
When reviewing https://github.com/apache/incubator-uniffle/pull/1991, I was
thinking whether we should make SupplierGauge generic or not, due to its
limited usage, I concluded that `Supplier<Double>` might be sufficient.
However, it's clear to make it generic and the corresponding code are
cleaner.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]