You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/02/25 14:33:10 UTC

[GitHub] [spark] tgravescs commented on a change in pull request #27693: [SPARK-30947][CORE] Don't log accelerate resources when it's empty

tgravescs commented on a change in pull request #27693: [SPARK-30947][CORE] Don't log accelerate resources when it's empty
URL: https://github.com/apache/spark/pull/27693#discussion_r383914970
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/resource/ResourceUtils.scala
 ##########
 @@ -362,8 +362,9 @@ private[spark] object ResourceUtils extends Logging {
 
   def logResourceInfo(componentName: String, resources: Map[String, ResourceInformation])
     : Unit = {
+    if (resources.isEmpty) return
     logInfo("==============================================================")
-    logInfo(s"Resources for $componentName:\n${resources.mkString("\n")}")
+    logInfo(s"Accelerate Resources for $componentName:\n${resources.mkString("\n")}")
 
 Review comment:
   I'm not sure what your question is, you can see where this is called from. - both driver and executors. This was before the REsourceProfile was introduced. I chose to leave it even when empty for consistency in reading the logs and I don't see it hurts anything and it just tells you nothing was set, but if you want it removed I'm ok with that as well. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org