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

 ##########
 File path: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ResourceRequestHelper.scala
 ##########
 @@ -143,7 +143,7 @@ private object ResourceRequestHelper extends Logging {
     require(resource != null, "Resource parameter should not be null!")
 
     logDebug(s"Custom resources requested: $resources")
-    if (!isYarnResourceTypesAvailable()) {
+    if (!isYarnResourceTypesAvailable() || resources.isEmpty) {
 
 Review comment:
   The code could be cleaner here, that said the warning doesn't fire unless 
`!isYarnResourceTypes()`. It's just a way to exit early if `resources.isEmpty`, 
but if `resources` is empty, it will not fire the warning. I can move that 
check to another if statement.

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