public class Instance extends NetworkNode
TaskManager runs on.| Constructor and Description |
|---|
Instance(InstanceConnectionInfo instanceConnectionInfo,
NetworkNode parentNode,
NetworkTopology networkTopology,
HardwareDescription hardwareDescription,
int numberOfSlots)
Constructs an abstract instance object.
|
| Modifier and Type | Method and Description |
|---|---|
AllocatedResource |
allocateSlot(JobID jobID) |
TaskCancelResult |
cancelTask(ExecutionVertexID id)
Cancels the task identified by the given ID at the instance's
TaskManager. |
void |
checkLibraryAvailability(JobID jobID)
Checks if all the libraries required to run the job with the given
job ID are available on this instance.
|
void |
destroyProxies()
Destroys all RPC stub objects attached to this instance.
|
boolean |
equals(Object obj) |
Collection<AllocatedSlot> |
getAllocatedSlots() |
HardwareDescription |
getHardwareDescription()
Returns the instance's hardware description as reported by the instance itself.
|
InstanceConnectionInfo |
getInstanceConnectionInfo()
Returns the instance's connection information object.
|
long |
getLastHeartBeat() |
int |
getNumberOfAvailableSlots() |
int |
getNumberOfSlots() |
int |
hashCode() |
void |
invalidateLookupCacheEntries(Set<ChannelID> channelIDs)
Invalidates the entries identified by the given channel IDs from the remote task manager's receiver lookup cache.
|
boolean |
isStillAlive(long cleanUpInterval)
Returns whether the host is still alive.
|
TaskKillResult |
killTask(ExecutionVertexID id)
Kills the task identified by the given ID at the instance's
TaskManager. |
void |
killTaskManager()
Kills the task manager running on this instance.
|
void |
logBufferUtilization()
Triggers the remote task manager to print out the current utilization of its read and write buffers to its logs.
|
void |
releaseSlot(AllocationID allocationID) |
Collection<AllocatedSlot> |
removeAllocatedSlots() |
void |
reportHeartBeat()
Updates the time of last received heart beat to the current system time.
|
List<TaskSubmissionResult> |
submitTasks(List<TaskDeploymentDescriptor> tasks)
Submits a list of tasks to the instance's
TaskManager. |
getChildNode, getDepth, getDistance, getDistance, getHeight, getName, getNetworkTopology, getNumberOfChildNodes, getParentNode, isLeafNode, isRootNode, read, remove, toString, writepublic Instance(InstanceConnectionInfo instanceConnectionInfo, NetworkNode parentNode, NetworkTopology networkTopology, HardwareDescription hardwareDescription, int numberOfSlots)
instanceConnectionInfo - the connection info identifying the instanceparentNode - the parent node in the network topologynetworkTopology - the network topology this node is a part ofhardwareDescription - the hardware description provided by the instance itselfpublic final InstanceConnectionInfo getInstanceConnectionInfo()
public HardwareDescription getHardwareDescription()
public void checkLibraryAvailability(JobID jobID) throws IOException
jobID - the ID of the job whose libraries are to be checked forIOException - thrown if an error occurs while checking for the librariespublic List<TaskSubmissionResult> submitTasks(List<TaskDeploymentDescriptor> tasks) throws IOException
TaskManager.tasks - the list of tasks to be submittedIOException - thrown if an error occurs while transmitting the taskpublic TaskCancelResult cancelTask(ExecutionVertexID id) throws IOException
TaskManager.id - the ID identifying the task to be canceledIOException - thrown if an error occurs while transmitting the request or receiving the responsepublic TaskKillResult killTask(ExecutionVertexID id) throws IOException
TaskManager.id - the ID identifying the task to be killedIOException - thrown if an error occurs while transmitting the request or receiving the responsepublic void reportHeartBeat()
public boolean isStillAlive(long cleanUpInterval)
cleanUpInterval - duration (in milliseconds) after which a host is
considered dead if it has no received heat-beats.true if the host has received a heat-beat before the cleanUpInterval duration
has expired, false otherwisepublic void logBufferUtilization()
throws IOException
IOException - thrown if an error occurs while transmitting the requestpublic void killTaskManager()
throws IOException
IOException - thrown if an error occurs while transmitting the requestpublic void invalidateLookupCacheEntries(Set<ChannelID> channelIDs) throws IOException
channelIDs - the channel IDs identifying the cache entries to invalidateIOException - thrown if an error occurs during this remote procedure callpublic void destroyProxies()
public int getNumberOfSlots()
public int getNumberOfAvailableSlots()
public AllocatedResource allocateSlot(JobID jobID) throws InstanceException
InstanceExceptionpublic void releaseSlot(AllocationID allocationID)
public Collection<AllocatedSlot> getAllocatedSlots()
public Collection<AllocatedSlot> removeAllocatedSlots()
public long getLastHeartBeat()
Copyright © 2014 The Apache Software Foundation. All rights reserved.