public class TaskResourceRequests
extends Object
implements scala.Serializable
Constructor and Description |
---|
TaskResourceRequests() |
Modifier and Type | Method and Description |
---|---|
TaskResourceRequests |
addRequest(TaskResourceRequest treq)
Add a certain
TaskResourceRequest to the request set. |
TaskResourceRequests |
cpus(int amount)
Specify number of cpus per Task.
|
scala.collection.immutable.Map<String,TaskResourceRequest> |
requests()
Returns all the resource requests for the task.
|
java.util.Map<String,TaskResourceRequest> |
requestsJMap()
(Java-specific) Returns all the resource requests for the task.
|
TaskResourceRequests |
resource(String resourceName,
double amount)
Amount of a particular custom resource(GPU, FPGA, etc) to use.
|
String |
toString() |
public TaskResourceRequests addRequest(TaskResourceRequest treq)
TaskResourceRequest
to the request set.treq
- (undocumented)public TaskResourceRequests cpus(int amount)
TaskResourceRequest
for cpus.
amount
- Number of cpus to allocate per Task.public scala.collection.immutable.Map<String,TaskResourceRequest> requests()
public java.util.Map<String,TaskResourceRequest> requestsJMap()
public TaskResourceRequests resource(String resourceName, double amount)
TaskResourceRequest
for custom resources.
resourceName
- Name of the resource.amount
- Amount requesting as a Double to support fractional resource requests.
Valid values are less than or equal to 0.5 or whole numbers. This essentially
lets you configure X number of tasks to run on a single resource,
ie amount equals 0.5 translates into 2 tasks per resource address.public String toString()
toString
in class Object