shrirangmhalgi commented on code in PR #57257:
URL: https://github.com/apache/spark/pull/57257#discussion_r3601029988


##########
core/src/main/scala/org/apache/spark/scheduler/SchedulingAlgorithm.scala:
##########
@@ -17,12 +17,21 @@
 
 package org.apache.spark.scheduler
 
+import org.apache.spark.annotation.DeveloperApi
+
 /**
- * An interface for sort algorithm
+ * :: DeveloperApi ::
+ * An interface for the sort algorithm used to order schedulable entities 
(pools or task sets).
  * FIFO: FIFO algorithm between TaskSetManagers
  * FS: FS algorithm between Pools, and FIFO or FS within Pools
+ *
+ * `comparator` follows `sortWith` semantics: it returns `true` if `s1` should 
be scheduled before
+ * `s2`. A custom implementation can be installed on the root pool via the 
configuration
+ * `spark.scheduler.rootPool.algorithm.class`; the implementing class must 
have a no-argument
+ * constructor.
  */
-private[spark] trait SchedulingAlgorithm {
+@DeveloperApi

Review Comment:
   nit: `FIFOSchedulingAlgorithm` and `FairSchedulingAlgorithm` remain 
`private[spark]` - users can't extend or instantiate the built-in algorithms 
directly. Is that intentional? If a user wants "FAIR but with different 
tie-breaking", they'd have to rewrite the entire algorithm from scratch instead 
of subclassing.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to