You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "gaoyajun02 (via GitHub)" <gi...@apache.org> on 2026/07/06 04:46:16 UTC

Re: [PR] [CELEBORN-2376] Filter empty ResourceConsumption entries in WorkerInfo toString output [celeborn]

gaoyajun02 commented on code in PR #3754:
URL: https://github.com/apache/celeborn/pull/3754#discussion_r3526459279


##########
common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala:
##########
@@ -270,9 +270,14 @@ class WorkerInfo(
       if (userResourceConsumption == null || userResourceConsumption.isEmpty) {
         "empty"
       } else if (userResourceConsumption != null) {
-        userResourceConsumption.asScala.map { case (userIdentifier, resourceConsumption) =>
-          s"\n  UserIdentifier: ${userIdentifier}, ResourceConsumption: ${resourceConsumption}"
-        }.mkString("")
+        val nonEmpty = userResourceConsumption.asScala.filterNot(_._2.isEmpty)

Review Comment:
   Fixed the redundant null check



-- 
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: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org