public class TaskSchedulePlanBuilder
extends java.lang.Object
Constructor and Description |
---|
TaskSchedulePlanBuilder(int scheduleId,
TaskSchedulePlan previousTaskSchedulePlan) |
Modifier and Type | Method and Description |
---|---|
TaskSchedulePlanBuilder |
addInstance(java.lang.Integer containerId,
java.lang.String taskName) |
void |
addInstance(Scorer<Container> scorer,
java.lang.String taskName)
It will add the task instance to the container based on the container score value.
|
TaskSchedulePlan |
build()
This method first validates the available resource settings and invoke the build container
plans method to build the container based on the task instance ram, disk, and cpu map values.
|
java.util.Map<java.lang.Integer,Container> |
getContainers() |
int |
getJobId() |
TaskSchedulePlanBuilder |
setContainerMaximumResourceValue(Resource containerMaxResourceValue) |
void |
setContainers(java.util.Map<java.lang.Integer,Container> containers) |
TaskSchedulePlanBuilder |
setInstanceDefaultResourceValue(Resource defaultResourcevalue) |
void |
setJobId(int jobId) |
TaskSchedulePlanBuilder |
setRequestedContainerPadding(int reqContainerPadding) |
TaskSchedulePlanBuilder |
setTaskCpuMap(java.util.Map<java.lang.String,java.lang.Double> taskcpuMap) |
TaskSchedulePlanBuilder |
setTaskDiskMap(java.util.Map<java.lang.String,java.lang.Double> taskdiskMap) |
TaskSchedulePlanBuilder |
setTaskRamMap(java.util.Map<java.lang.String,java.lang.Double> taskramMap) |
TaskSchedulePlanBuilder |
updateNumContainers(int numOfContainers) |
public TaskSchedulePlanBuilder(int scheduleId, TaskSchedulePlan previousTaskSchedulePlan)
public java.util.Map<java.lang.Integer,Container> getContainers()
public void setContainers(java.util.Map<java.lang.Integer,Container> containers)
public TaskSchedulePlanBuilder setTaskRamMap(java.util.Map<java.lang.String,java.lang.Double> taskramMap)
public TaskSchedulePlanBuilder setTaskDiskMap(java.util.Map<java.lang.String,java.lang.Double> taskdiskMap)
public TaskSchedulePlanBuilder setTaskCpuMap(java.util.Map<java.lang.String,java.lang.Double> taskcpuMap)
public int getJobId()
public void setJobId(int jobId)
public TaskSchedulePlanBuilder setInstanceDefaultResourceValue(Resource defaultResourcevalue)
public TaskSchedulePlanBuilder setContainerMaximumResourceValue(Resource containerMaxResourceValue)
public TaskSchedulePlanBuilder setRequestedContainerPadding(int reqContainerPadding)
public TaskSchedulePlanBuilder updateNumContainers(int numOfContainers)
public TaskSchedulePlanBuilder addInstance(java.lang.Integer containerId, java.lang.String taskName) throws TaskSchedulerException
TaskSchedulerException
public void addInstance(Scorer<Container> scorer, java.lang.String taskName) throws TaskSchedulerException
TaskSchedulerException
public TaskSchedulePlan build()