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/06/01 09:23:22 UTC

[GitHub] [spark] caneGuy commented on a change in pull request #28688: [SPARK-29880][CORE][YARN] Handle submit exception when submit to federation cluster

caneGuy commented on a change in pull request #28688:
URL: https://github.com/apache/spark/pull/28688#discussion_r433130400



##########
File path: resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
##########
@@ -171,8 +171,14 @@ private[spark] class Client(
       yarnClient.init(hadoopConf)
       yarnClient.start()
 
-      logInfo("Requesting a new application from cluster with %d NodeManagers"
-        .format(yarnClient.getYarnClusterMetrics.getNumNodeManagers))
+      try {
+        logInfo(s"Requesting a new application from cluster" +
+          s" ${hadoopConf.get(YarnConfiguration.RM_ADDRESS, YarnConfiguration.DEFAULT_RM_ADDRESS)}" +
+          s" with %d NodeManagers.".format(yarnClient.getYarnClusterMetrics.getNumNodeManagers))

Review comment:
       if it can call `yarnClient.getYarnClusterMetrics.getNumNodeManagers` without exception, i tend to keep the original log info.




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



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