ivoson commented on code in PR #37268:
URL: https://github.com/apache/spark/pull/37268#discussion_r945589982
##########
core/src/main/scala/org/apache/spark/resource/ResourceProfileBuilder.scala:
##########
@@ -76,6 +79,17 @@ class ResourceProfileBuilder() {
this
}
+ /**
+ * Specify target resource profile type.
+ * @param isTaskResourceProfile will create a [[TaskResourceProfile]] if
true, otherwise a
+ * normal [[ResourceProfile]]
+ * @return This ResourceProfileBuilder
+ */
+ def taskOnly(isTaskResourceProfile: Boolean = true): this.type = {
Review Comment:
> Why do we still need `isTaskResourceProfile` since the function is already
named `taskOnly()`?
@Ngone51 Just want to provide a method that user can override the property
`isTaskResourceProfile ` to reuse the resource profile builder to create normal
`ResourceProfile`, since there are existing methods to override/cleanup
resource requests:
[clearExecutorResourceRequests](https://github.com/apache/spark/blob/v3.3.0/core/src/main/scala/org/apache/spark/resource/ResourceProfileBuilder.scala#L79)
Do you think is it necessary? or any other suggestions?
--
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]