public class BatchedRequests extends Object implements ConstraintPlacementAlgorithmInput, Iterable<org.apache.hadoop.yarn.api.records.SchedulingRequest>
Modifier and Type | Class and Description |
---|---|
static class |
BatchedRequests.IteratorType
Iterator Type.
|
Constructor and Description |
---|
BatchedRequests(BatchedRequests.IteratorType type,
org.apache.hadoop.yarn.api.records.ApplicationId applicationId,
Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> requests,
int attempt) |
Modifier and Type | Method and Description |
---|---|
void |
addToBatch(org.apache.hadoop.yarn.api.records.SchedulingRequest req)
Add a Scheduling request to the batch.
|
void |
addToBlacklist(Set<String> tags,
SchedulerNode node) |
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId()
Get Application Id.
|
Set<org.apache.hadoop.yarn.api.records.NodeId> |
getBlacklist(String tag)
Get any blacklisted nodes associated with tag.
|
BatchedRequests.IteratorType |
getIteratorType()
Get Iterator type.
|
int |
getPlacementAttempt()
Get placement attempt.
|
Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> |
getSchedulingRequests()
Get Collection of SchedulingRequests in this batch.
|
Iterator<org.apache.hadoop.yarn.api.records.SchedulingRequest> |
iterator()
Exposes SchedulingRequest Iterator interface which can be used
to traverse requests using different heuristics i.e.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public BatchedRequests(BatchedRequests.IteratorType type, org.apache.hadoop.yarn.api.records.ApplicationId applicationId, Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> requests, int attempt)
public Iterator<org.apache.hadoop.yarn.api.records.SchedulingRequest> iterator()
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
public Collection<org.apache.hadoop.yarn.api.records.SchedulingRequest> getSchedulingRequests()
getSchedulingRequests
in interface ConstraintPlacementAlgorithmInput
public void addToBatch(org.apache.hadoop.yarn.api.records.SchedulingRequest req)
req
- Scheduling Request.public void addToBlacklist(Set<String> tags, SchedulerNode node)
public int getPlacementAttempt()
public Set<org.apache.hadoop.yarn.api.records.NodeId> getBlacklist(String tag)
tag
- Tag.public BatchedRequests.IteratorType getIteratorType()
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.