public interface ResourceActions
SlotManager
can perform.Modifier and Type | Method and Description |
---|---|
boolean |
allocateResource(WorkerResourceSpec workerResourceSpec)
Requests to allocate a resource with the given
WorkerResourceSpec . |
void |
notifyNotEnoughResourcesAvailable(JobID jobId,
Collection<ResourceRequirement> acquiredResources)
Notifies that not enough resources are available to fulfill the resource requirements of a
job.
|
void |
releaseResource(InstanceID instanceId,
Exception cause)
Releases the resource with the given instance id.
|
void releaseResource(InstanceID instanceId, Exception cause)
instanceId
- identifying which resource to releasecause
- why the resource is releasedboolean allocateResource(WorkerResourceSpec workerResourceSpec)
WorkerResourceSpec
.workerResourceSpec
- for the to be allocated workervoid notifyNotEnoughResourcesAvailable(JobID jobId, Collection<ResourceRequirement> acquiredResources)
jobId
- job for which not enough resources are availableacquiredResources
- the resources that have been acquired for the jobCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.