public class PlacementSpec
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
org.apache.hadoop.yarn.api.resource.PlacementConstraint |
constraint |
|
java.lang.String |
sourceTag |
| Constructor | Description |
|---|---|
PlacementSpec(java.lang.String sourceTag,
int numContainers,
org.apache.hadoop.yarn.api.resource.PlacementConstraint constraint) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
getNumContainers() |
Get the number of container for this spec.
|
static java.util.Map<java.lang.String,PlacementSpec> |
parse(java.lang.String specs) |
Parser to convert a string representation of a placement spec to mapping
from source tag to Placement Constraint.
|
void |
setNumContainers(int numContainers) |
Set number of containers for this spec.
|
public final java.lang.String sourceTag
public final org.apache.hadoop.yarn.api.resource.PlacementConstraint constraint
public PlacementSpec(java.lang.String sourceTag,
int numContainers,
org.apache.hadoop.yarn.api.resource.PlacementConstraint constraint)
public int getNumContainers()
public void setNumContainers(int numContainers)
numContainers - number of containers.public static java.util.Map<java.lang.String,PlacementSpec> parse(java.lang.String specs) throws java.lang.IllegalArgumentException
specs - Placement spec.java.lang.IllegalArgumentExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.