ResourceAllocator¶
ResourceAllocator
is an abstraction of resource allocators.
Contract¶
resourceAddresses¶
resourceAddresses: Seq[String]
Used when:
ResourceAllocator
is requested for the addressAvailabilityMap
resourceName¶
resourceName: String
Used when:
slotsPerAddress¶
slotsPerAddress: Int
Used when:
ResourceAllocator
is requested for the addressAvailabilityMap, assignedAddrs and to release
Implementations¶
- ExecutorResourceInfo
WorkerResourceInfo
(Spark Standalone)
Acquiring Addresses¶
acquire(
addrs: Seq[String]): Unit
acquire
...FIXME
acquire
is used when:
DriverEndpoint
is requested to launchTasksWorkerResourceInfo
(Spark Standalone) is requested toacquire
andrecoverResources
Releasing Addresses¶
release(
addrs: Seq[String]): Unit
release
...FIXME
release
is used when:
DriverEndpoint
is requested to handle a StatusUpdate eventWorkerInfo
(Spark Standalone) is requested toreleaseResources
assignedAddrs¶
assignedAddrs: Seq[String]
assignedAddrs
...FIXME
assignedAddrs
is used when:
WorkerInfo
(Spark Standalone) is requested for theresourcesInfoUsed
availableAddrs¶
availableAddrs: Seq[String]
availableAddrs
...FIXME
availableAddrs
is used when:
WorkerInfo
(Spark Standalone) is requested for theresourcesInfoFree
WorkerResourceInfo
(Spark Standalone) is requested toacquire
andresourcesAmountFree
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:
ResourceAllocator
is requested to availableAddrs, assignedAddrs, acquire, release