TaskResourceRequests¶
TaskResourceRequests is a convenience API to work with TaskResourceRequests (and hence the name 😉).
TaskResourceRequests can be defined as required using ResourceProfileBuilder.
TaskResourceRequests can be specified using configuration properties (using spark.task prefix).
| Resource Name | Registerer |
|---|---|
cpus | cpus |
| user-defined name | resource, addRequest |
Creating Instance¶
TaskResourceRequests takes no arguments to be created.
TaskResourceRequests is created when:
ResourceProfileis requested for the default task resource requests
Serializable¶
TaskResourceRequests is Serializable (Java).
cpus¶
cpus(
amount: Int): this.type
cpus registers a TaskResourceRequest with cpus resource name and the given amount (in the _taskResources registry) under the name cpus.
Fluent API
cpus is part of the fluent API of (and hence this strange-looking this.type return type).
cpus is used when:
ResourceProfileis requested for the default task resource requests
_taskResources¶
_taskResources: ConcurrentHashMap[String, TaskResourceRequest]
_taskResources is a collection of TaskResourceRequests by their resource name.
_taskResources is available as requests.
requests¶
requests: Map[String, TaskResourceRequest]
requests returns the _taskResources (converted to Scala).
requests is used when:
ResourceProfileis requested for the default task resource requestsResourceProfileBuilderis requested to requireTaskResourceRequestsis requested for the string representation