Class TaskResourceRequest

Object
org.apache.spark.resource.TaskResourceRequest
All Implemented Interfaces:
Serializable, scala.Serializable

public class TaskResourceRequest extends Object implements scala.Serializable
A task resource request. This is used in conjunction with the ResourceProfile to programmatically specify the resources needed for an RDD that will be applied at the stage level.

Use TaskResourceRequests class as a convenience API.

param: resourceName Resource name param: 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.

See Also:
  • Constructor Details

    • TaskResourceRequest

      public TaskResourceRequest(String resourceName, double amount)
  • Method Details

    • amount

      public double amount()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • resourceName

      public String resourceName()
    • toString

      public String toString()
      Overrides:
      toString in class Object