diff --git a/core/src/main/scala/org/apache/spark/resource/ResourceProfile.scala b/core/src/main/scala/org/apache/spark/resource/ResourceProfile.scala index 03dcf5e317..2608ab9fc0 100644 --- a/core/src/main/scala/org/apache/spark/resource/ResourceProfile.scala +++ b/core/src/main/scala/org/apache/spark/resource/ResourceProfile.scala @@ -183,7 +183,7 @@ class ResourceProfile( "no corresponding task resource request was specified.") } } - if(!shouldCheckExecCores) { + if(!shouldCheckExecCores && Utils.isDynamicAllocationEnabled(sparkConf)) { // if we can't rely on the executor cores config throw a warning for user logWarning("Please ensure that the number of slots available on your " + "executors is limited by the number of cores to task cpus and not another " +