S
- the type of SchedulableEntity
that will be comparedpublic interface OrderingPolicy<S extends SchedulableEntity>
Modifier and Type | Method and Description |
---|---|
void |
addAllSchedulableEntities(Collection<S> sc)
Add a collection of
SchedulableEntity objects to be managed for
allocation and preemption ordering. |
void |
addSchedulableEntity(S s)
Add a
SchedulableEntity to be managed for allocation and preemption
ordering. |
void |
configure(Map<String,String> conf)
Provides configuration information for the policy from the scheduler
configuration.
|
void |
containerAllocated(S schedulableEntity,
RMContainer r)
Notify the
OrderingPolicy that the SchedulableEntity
has been allocated the given RMContainer , enabling the
OrderingPolicy to take appropriate action. |
void |
containerReleased(S schedulableEntity,
RMContainer r)
Notify the
OrderingPolicy that the SchedulableEntity
has released the given RMContainer , enabling the
OrderingPolicy to take appropriate action. |
void |
demandUpdated(S schedulableEntity)
Notify the
OrderingPolicy that the demand for the
SchedulableEntity has been updated, enabling the
OrderingPolicy to reorder the SchedulableEntity if needed. |
Iterator<S> |
getAssignmentIterator(IteratorSelector sel)
Return an iterator over the collection of
SchedulableEntity
objects which orders them for container assignment. |
String |
getConfigName()
Return configuration name (which will be used to set ordering policy).
|
String |
getInfo()
Return information regarding configuration and status.
|
int |
getNumSchedulableEntities()
Get the number of
SchedulableEntity objects managed for allocation
and preemption ordering. |
Iterator<S> |
getPreemptionIterator()
Return an iterator over the collection of
SchedulableEntity
objects which orders them for preemption. |
Collection<S> |
getSchedulableEntities()
Get the collection of
SchedulableEntity Objects which are managed
by this OrderingPolicy - should include processes returned by the
Assignment and Preemption iterator with no guarantees regarding order. |
boolean |
removeSchedulableEntity(S s)
Remove a
SchedulableEntity from management for allocation and
preemption ordering. |
Collection<S> getSchedulableEntities()
SchedulableEntity
Objects which are managed
by this OrderingPolicy - should include processes returned by the
Assignment and Preemption iterator with no guarantees regarding order.SchedulableEntity
objectsIterator<S> getAssignmentIterator(IteratorSelector sel)
SchedulableEntity
objects which orders them for container assignment.sel
- the IteratorSelector
to filter withSchedulableEntity
objectsIterator<S> getPreemptionIterator()
SchedulableEntity
objects which orders them for preemption.SchedulableEntity
void addSchedulableEntity(S s)
SchedulableEntity
to be managed for allocation and preemption
ordering.s
- the SchedulableEntity
to addboolean removeSchedulableEntity(S s)
SchedulableEntity
from management for allocation and
preemption ordering.s
- the SchedulableEntity
to removeSchedulableEntity
was present before this
operationvoid addAllSchedulableEntities(Collection<S> sc)
SchedulableEntity
objects to be managed for
allocation and preemption ordering.sc
- the collection of SchedulableEntity
objects to addint getNumSchedulableEntities()
SchedulableEntity
objects managed for allocation
and preemption ordering.SchedulableEntity
objectsvoid configure(Map<String,String> conf)
conf
- a map of scheduler configuration properties and valuesvoid containerAllocated(S schedulableEntity, RMContainer r)
OrderingPolicy
that the SchedulableEntity
has been allocated the given RMContainer
, enabling the
OrderingPolicy
to take appropriate action. Depending on the
comparator, a reordering of the SchedulableEntity
may be required.schedulableEntity
- the SchedulableEntity
r
- the allocated RMContainer
void containerReleased(S schedulableEntity, RMContainer r)
OrderingPolicy
that the SchedulableEntity
has released the given RMContainer
, enabling the
OrderingPolicy
to take appropriate action. Depending on the
comparator, a reordering of the SchedulableEntity
may be required.schedulableEntity
- the SchedulableEntity
r
- the released RMContainer
void demandUpdated(S schedulableEntity)
OrderingPolicy
that the demand for the
SchedulableEntity
has been updated, enabling the
OrderingPolicy
to reorder the SchedulableEntity
if needed.schedulableEntity
- the updated SchedulableEntity
String getInfo()
String getConfigName()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.