MultiNodeLookupPolicy<N>public class ResourceUsageMultiNodeLookupPolicy<N extends SchedulerNode> extends java.lang.Object implements MultiNodeLookupPolicy<N>
This class has the following functionality:
ResourceUsageMultiNodeLookupPolicy holds sorted nodes list based on the resource usage of nodes at given time.
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.Comparator<N> |
comparator |
|
protected java.util.Map<java.lang.String,java.util.Set<N>> |
nodesPerPartition |
| Constructor | Description |
|---|---|
ResourceUsageMultiNodeLookupPolicy() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addAndRefreshNodesSet(java.util.Collection<N> nodes,
java.lang.String partition) |
Refresh working nodes set for re-ordering based on the algorithm selected.
|
java.util.Set<N> |
getNodesPerPartition(java.lang.String partition) |
Get sorted nodes per partition.
|
java.util.Iterator<N> |
getPreferredNodeIterator(java.util.Collection<N> nodes,
java.lang.String partition) |
Get iterator of preferred node depends on requirement and/or availability.
|
protected java.util.Map<java.lang.String,java.util.Set<N extends SchedulerNode>> nodesPerPartition
protected java.util.Comparator<N extends SchedulerNode> comparator
public java.util.Iterator<N> getPreferredNodeIterator(java.util.Collection<N> nodes, java.lang.String partition)
MultiNodeLookupPolicygetPreferredNodeIterator in interface MultiNodeLookupPolicy<N extends SchedulerNode>nodes - List of Nodespartition - node labelpublic void addAndRefreshNodesSet(java.util.Collection<N> nodes, java.lang.String partition)
MultiNodeLookupPolicyaddAndRefreshNodesSet in interface MultiNodeLookupPolicy<N extends SchedulerNode>nodes - a collection working nm's.partition - node labelpublic java.util.Set<N> getNodesPerPartition(java.lang.String partition)
MultiNodeLookupPolicygetNodesPerPartition in interface MultiNodeLookupPolicy<N extends SchedulerNode>partition - node labelCopyright © 2008–2025 Apache Software Foundation. All rights reserved.