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 2019/08/09 22:56:20 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #25403: [SPARK-28679][YARN] changes to setResourceInformation to handle empty resources and reflection error handling

dongjoon-hyun commented on a change in pull request #25403: [SPARK-28679][YARN] changes to setResourceInformation to handle empty resources and reflection error handling
URL: https://github.com/apache/spark/pull/25403#discussion_r312670988
 
 

 ##########
 File path: resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
 ##########
 @@ -153,7 +153,14 @@ private object ResourceRequestHelper extends Logging {
 
     val resInfoClass = Utils.classForName(RESOURCE_INFO_CLASS)
     val setResourceInformationMethod =
-      resource.getClass.getMethod("setResourceInformation", classOf[String], resInfoClass)
+      try { 
+        resource.getClass.getMethod("setResourceInformation", classOf[String], resInfoClass)
+      } catch {
+        case e: NoSuchMethodException => 
+          logError(s"Cannot find $RESOURCE_INFO_CLASS.setResourceInformation. This is likely due to a jar conflict between different yarn versions. Unable to set resources.")
 
 Review comment:
   Hi, @abellina .
   Thank you for your contribution. Before making a PR, you can check the scala style rule. For example, this line will fails at Scala Style check. Could you fix it?
   ```
   $ dev/scalastyle
   ```
   ```

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