@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 String |
oldAppId |
protected String |
queue |
protected static org.apache.hadoop.yarn.factories.RecordFactory |
recordFactory |
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 |
| 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,
org.apache.hadoop.yarn.api.records.ExecutionType executionType,
String host,
int priority,
int numContainers) |
void |
firstStep()
register with RM
|
String |
getAMType() |
org.apache.hadoop.yarn.api.records.ApplicationAttemptId |
getApplicationAttemptId() |
org.apache.hadoop.yarn.api.records.ApplicationId |
getApplicationId() |
long |
getDuration() |
int |
getNumTasks() |
String |
getQueue() |
void |
init(int heartbeatInterval,
List<ContainerSimulator> containerList,
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager resourceManager,
SLSRunner slsRunnner,
long startTime,
long finishTime,
String simUser,
String simQueue,
boolean tracked,
String oldApp,
long baseTimeMS,
org.apache.hadoop.yarn.api.records.Resource amResource,
String nodeLabelExpr,
Map<String,String> params,
Map<org.apache.hadoop.yarn.api.records.ApplicationId,AMSimulator> appIdAMSim) |
abstract void |
initReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
long deadline,
long now) |
void |
lastStep() |
void |
middleStep() |
void |
notifyAMContainerLaunched(org.apache.hadoop.yarn.api.records.Container masterContainer) |
protected List<org.apache.hadoop.yarn.api.records.ResourceRequest> |
packageRequests(List<ContainerSimulator> csList,
int priority) |
protected abstract void |
processResponseQueue() |
protected abstract void |
sendContainerRequest() |
protected void |
setReservationRequest(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest rr) |
void |
untrackApp() |
compareTo, getDelay, init, init, run, setEndTimeprotected 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 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
public void init(int heartbeatInterval,
List<ContainerSimulator> containerList,
org.apache.hadoop.yarn.server.resourcemanager.ResourceManager resourceManager,
SLSRunner slsRunnner,
long startTime,
long finishTime,
String simUser,
String simQueue,
boolean tracked,
String oldApp,
long baseTimeMS,
org.apache.hadoop.yarn.api.records.Resource amResource,
String nodeLabelExpr,
Map<String,String> params,
Map<org.apache.hadoop.yarn.api.records.ApplicationId,AMSimulator> appIdAMSim)
public void firstStep()
throws Exception
firstStep in class TaskRunner.TaskExceptionpublic void notifyAMContainerLaunched(org.apache.hadoop.yarn.api.records.Container masterContainer)
throws Exception
Exceptionprotected void setReservationRequest(org.apache.hadoop.yarn.api.protocolrecords.ReservationSubmissionRequest rr)
public void middleStep()
throws Exception
middleStep in class TaskRunner.TaskExceptionpublic void lastStep()
throws Exception
lastStep in class TaskRunner.TaskExceptionprotected org.apache.hadoop.yarn.api.records.ResourceRequest createResourceRequest(org.apache.hadoop.yarn.api.records.Resource resource,
org.apache.hadoop.yarn.api.records.ExecutionType executionType,
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
Exceptionprotected abstract void sendContainerRequest()
throws Exception
Exceptionpublic abstract void initReservation(org.apache.hadoop.yarn.api.records.ReservationId reservationId,
long deadline,
long now)
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()
public org.apache.hadoop.yarn.api.records.ApplicationId getApplicationId()
public org.apache.hadoop.yarn.api.records.ApplicationAttemptId getApplicationAttemptId()
Copyright © 2008–2020 Apache Software Foundation. All rights reserved.