This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new ac7c52d  [MINOR][DOC] Update doc for 
`ResourceProfileManager.isSupported`
ac7c52d is described below

commit ac7c52db28f35237f78215c38b274a45c1ae7462
Author: Zhenhua Wang <[email protected]>
AuthorDate: Tue Nov 30 20:03:04 2021 +0900

    [MINOR][DOC] Update doc for `ResourceProfileManager.isSupported`
    
    ### What changes were proposed in this pull request?
    
    Only doc update.
    
    ### Why are the changes needed?
    
    The doc doesn't match the actual logic.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Not related.
    
    Closes #34756 from wzhfy/improve_doc.
    
    Authored-by: Zhenhua Wang <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 .../scala/org/apache/spark/resource/ResourceProfileManager.scala    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/core/src/main/scala/org/apache/spark/resource/ResourceProfileManager.scala 
b/core/src/main/scala/org/apache/spark/resource/ResourceProfileManager.scala
index f3e9856..2858443 100644
--- a/core/src/main/scala/org/apache/spark/resource/ResourceProfileManager.scala
+++ b/core/src/main/scala/org/apache/spark/resource/ResourceProfileManager.scala
@@ -57,8 +57,10 @@ private[spark] class ResourceProfileManager(sparkConf: 
SparkConf,
   private val notRunningUnitTests = !isTesting
   private val testExceptionThrown = 
sparkConf.get(RESOURCE_PROFILE_MANAGER_TESTING)
 
-  // If we use anything except the default profile, its only supported on YARN 
right now.
-  // Throw an exception if not supported.
+  /**
+   * If we use anything except the default profile, it's only supported on 
YARN and Kubernetes
+   * with dynamic allocation enabled. Throw an exception if not supported.
+   */
   private[spark] def isSupported(rp: ResourceProfile): Boolean = {
     val isNotDefaultProfile = rp.id != 
ResourceProfile.DEFAULT_RESOURCE_PROFILE_ID
     val notYarnOrK8sAndNotDefaultProfile = isNotDefaultProfile && !(isYarn || 
isK8s)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to