Skip to content


ExecutorResourceRequests is a set of ExecutorResourceRequests for Spark developers to (programmatically) specify resources for an RDD to be applied at stage level:

Creating Instance

ExecutorResourceRequests takes no arguments to be created.

ExecutorResourceRequests is created when:


ExecutorResourceRequests is a Serializable (Java).


  resourceName: String,
  amount: Long,
  discoveryScript: String = "",
  vendor: String = ""): this.type

resource creates a ExecutorResourceRequest and registers it under resourceName.

resource is used when:

Text Representation

ExecutorResourceRequests presents itself as:

Executor resource requests: [_executorResources]


import org.apache.spark.resource.ExecutorResourceRequests
val executorResources = new ExecutorResourceRequests()
    resourceName = "my-custom-resource",
    amount = 1,
    discoveryScript = "/this/is/path/to/discovery/",
    vendor = "pl.japila")
scala> println(executorResources)
Executor resource requests: {memoryOverhead=name: memoryOverhead, amount: 512, script: , vendor: , memory=name: memory, amount: 2048, script: , vendor: , cores=name: cores, amount: 8, script: , vendor: , my-custom-resource=name: my-custom-resource, amount: 1, script: /this/is/path/to/discovery/, vendor: pl.japila}
Back to top