public class PlacementSpec extends Object
| Modifier and Type | Field and Description | 
|---|---|
| org.apache.hadoop.yarn.api.resource.PlacementConstraint | constraint | 
| String | sourceTag | 
| Constructor and Description | 
|---|
| PlacementSpec(String sourceTag,
             int numContainers,
             org.apache.hadoop.yarn.api.resource.PlacementConstraint constraint) | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getNumContainers()Get the number of container for this spec. | 
| static Map<String,PlacementSpec> | parse(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 String sourceTag
public final org.apache.hadoop.yarn.api.resource.PlacementConstraint constraint
public PlacementSpec(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 Map<String,PlacementSpec> parse(String specs) throws IllegalArgumentException
specs - Placement spec.IllegalArgumentExceptionCopyright © 2008–2023 Apache Software Foundation. All rights reserved.