Skip to content

ResourceAllocator

ResourceAllocator is an abstraction of resource allocators.

Contract

resourceAddresses

resourceAddresses: Seq[String]

Used when:

resourceName

resourceName: String

Used when:

slotsPerAddress

slotsPerAddress: Int

Used when:

Implementations

Acquiring Addresses

acquire(
  addrs: Seq[String]): Unit

acquire...FIXME

acquire is used when:

  • DriverEndpoint is requested to launchTasks
  • WorkerResourceInfo (Spark Standalone) is requested to acquire and recoverResources

Releasing Addresses

release(
  addrs: Seq[String]): Unit

release...FIXME

release is used when:

assignedAddrs

assignedAddrs: Seq[String]

assignedAddrs...FIXME

assignedAddrs is used when:

  • WorkerInfo (Spark Standalone) is requested for the resourcesInfoUsed

availableAddrs

availableAddrs: Seq[String]

availableAddrs...FIXME

availableAddrs is used when:

  • WorkerInfo (Spark Standalone) is requested for the resourcesInfoFree
  • WorkerResourceInfo (Spark Standalone) is requested to acquire and resourcesAmountFree
  • DriverEndpoint is requested to makeOffers

addressAvailabilityMap

addressAvailabilityMap: Seq[String]

addressAvailabilityMap...FIXME

Lazy Value

addressAvailabilityMap is a Scala lazy value to guarantee that the code to initialize it is executed once only (when accessed for the first time) and the computed value never changes afterwards.

Learn more in the Scala Language Specification.

addressAvailabilityMap is used when:

Back to top