squito commented on a change in pull request #24935: [SPARK-28005][SCHEDULER] 
Remove unnecessary log from SparkRackResolver
URL: https://github.com/apache/spark/pull/24935#discussion_r296430094
 
 

 ##########
 File path: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/SparkRackResolver.scala
 ##########
 @@ -72,8 +72,6 @@ private[spark] class SparkRackResolver(conf: Configuration) 
extends Logging {
     val rNameList = dnsToSwitchMapping.resolve(hostNames.toList.asJava).asScala
     if (rNameList == null || rNameList.isEmpty) {
       hostNames.foreach(nodes += new NodeBase(_, NetworkTopology.DEFAULT_RACK))
-      logInfo(s"Got an error when resolving hostNames. " +
 
 Review comment:
   yeah I don't think we want to delete this log line.  In fact I'd keep it at 
INFO, but I'd prevent logging this when `hostNames.isEmpty`.  (In fact, the 
entire function can be a no-op when `hostNames.isEmpty`).  Its a useful log msg 
when there really is an error -- but when the argument is empty, its logging 
even with no error. sorry if my description was unclear.
   
   (also sorry for the late comment -- I thought I posted something along these 
lines this morning but guess I forgot to submit it ..)

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


With regards,
Apache Git Services

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

Reply via email to