@InterfaceAudience.Private @InterfaceStability.Unstable public abstract class AMSimulator extends TaskRunner.Task
Modifier and Type | Field and Description |
---|---|
protected String |
amtype |
protected org.apache.hadoop.yarn.api.records.ApplicationAttemptId |
appAttemptId |
protected org.apache.hadoop.yarn.api.records.ApplicationId |
appId |
protected int |
finishedContainers |
protected boolean |
isTracked |
protected org.apache.log4j.Logger |
LOG |
protected String |
oldAppId |
protected String |
queue |
protected static org.apache.hadoop.yarn.factories.RecordFactory |
recordFactory |
protected int |
RESPONSE_ID |
protected BlockingQueue<org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse> |
responseQueue |
protected org.apache.hadoop.yarn.server.resourcemanager.ResourceManager |
rm |
protected SLSRunner |
se |
protected long |
simulateFinishTimeMS |
protected long |
simulateStartTimeMS |
protected int |
totalContainers |
protected long |
traceFinishTimeMS |
protected long |
traceStartTimeMS |
protected String |
user |
Constructor and Description |
---|
AMSimulator() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
checkStop() |
protected org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest |
createAllocateRequest(List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask) |
protected org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest |
createAllocateRequest(List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask,
List<org.apache.hadoop.yarn.api.records.ContainerId> toRelease) |
protected org.apache.hadoop.yarn.api.records.ResourceRequest |
createResourceRequest(org.apache.hadoop.yarn.api.records.Resource resource,
String host,
int priority,
int numContainers) |
void |
firstStep()
register with RM
|
String |
getAMType() |
long |
getDuration() |
int |
getNumTasks() |
String |
getQueue() |
void |
init(int id,
int heartbeatInterval,
List<ContainerSimulator> containerList,
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager rm,
SLSRunner se,
long traceStartTime,
long traceFinishTime,
String user,
String queue,
boolean isTracked,
String oldAppId) |
void |
lastStep() |
void |
middleStep() |
protected List<org.apache.hadoop.yarn.api.records.ResourceRequest> |
packageRequests(List<ContainerSimulator> csList,
int priority) |
protected abstract void |
processResponseQueue() |
protected abstract void |
sendContainerRequest() |
void |
untrackApp() |
compareTo, getDelay, init, init, run, setEndTime
protected org.apache.hadoop.yarn.server.resourcemanager.ResourceManager rm
protected SLSRunner se
protected org.apache.hadoop.yarn.api.records.ApplicationId appId
protected org.apache.hadoop.yarn.api.records.ApplicationAttemptId appAttemptId
protected String oldAppId
protected static final org.apache.hadoop.yarn.factories.RecordFactory recordFactory
protected final BlockingQueue<org.apache.hadoop.yarn.api.protocolrecords.AllocateResponse> responseQueue
protected int RESPONSE_ID
protected String user
protected String queue
protected String amtype
protected long traceStartTimeMS
protected long traceFinishTimeMS
protected long simulateStartTimeMS
protected long simulateFinishTimeMS
protected boolean isTracked
protected int totalContainers
protected int finishedContainers
protected final org.apache.log4j.Logger LOG
public void init(int id, int heartbeatInterval, List<ContainerSimulator> containerList, org.apache.hadoop.yarn.server.resourcemanager.ResourceManager rm, SLSRunner se, long traceStartTime, long traceFinishTime, String user, String queue, boolean isTracked, String oldAppId)
public void firstStep() throws Exception
firstStep
in class TaskRunner.Task
Exception
public void middleStep() throws Exception
middleStep
in class TaskRunner.Task
Exception
public void lastStep() throws Exception
lastStep
in class TaskRunner.Task
Exception
protected org.apache.hadoop.yarn.api.records.ResourceRequest createResourceRequest(org.apache.hadoop.yarn.api.records.Resource resource, String host, int priority, int numContainers)
protected org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest createAllocateRequest(List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask, List<org.apache.hadoop.yarn.api.records.ContainerId> toRelease)
protected org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest createAllocateRequest(List<org.apache.hadoop.yarn.api.records.ResourceRequest> ask)
protected abstract void processResponseQueue() throws Exception
Exception
protected abstract void sendContainerRequest() throws Exception
Exception
protected abstract void checkStop()
public void untrackApp()
protected List<org.apache.hadoop.yarn.api.records.ResourceRequest> packageRequests(List<ContainerSimulator> csList, int priority)
public String getQueue()
public String getAMType()
public long getDuration()
public int getNumTasks()
Copyright © 2018 Apache Software Foundation. All Rights Reserved.