public class TaskManager extends Object implements TaskOperationProtocol
| Modifier and Type | Field and Description |
|---|---|
static String |
ARG_CONF_DIR |
| Constructor and Description |
|---|
TaskManager(ExecutionMode executionMode)
All parameters are obtained from the
GlobalConfiguration, which must be loaded prior to instantiating the task manager. |
| Modifier and Type | Method and Description |
|---|---|
TaskCancelResult |
cancelTask(ExecutionVertexID id)
Advises the task manager to cancel the task with the given ID.
|
void |
executionStateChanged(JobID jobID,
ExecutionVertexID id,
ExecutionState newExecutionState,
String optionalDescription) |
LibraryCacheProfileResponse |
getLibraryCacheProfile(LibraryCacheProfileRequest request)
Queries the task manager about the cache status of the libraries stated in the
LibraryCacheProfileRequest
object. |
void |
invalidateLookupCacheEntries(Set<ChannelID> channelIDs)
Invalidates the entries identified by the given channel IDs from the task manager's receiver lookup cache.
|
boolean |
isShutDown()
Checks whether the task manager has already been shut down.
|
TaskKillResult |
killTask(ExecutionVertexID id)
Advises the task manager to kill the task with the given ID.
|
void |
killTaskManager()
Kills the task manager.
|
void |
logBufferUtilization()
Triggers the task manager write the current utilization of its read and write buffers to its logs.
|
static void |
main(String[] args)
Entry point for the program.
|
void |
shutdown()
Shuts the task manager down.
|
List<TaskSubmissionResult> |
submitTasks(List<TaskDeploymentDescriptor> tasks)
Submits a list of tasks to the task manager.
|
static boolean |
tryToConnect(InetAddress fromAddress,
SocketAddress toSocket,
int timeout) |
void |
updateLibraryCache(LibraryCacheUpdate update)
Updates the task manager's library cache.
|
public static final String ARG_CONF_DIR
public TaskManager(ExecutionMode executionMode) throws Exception
GlobalConfiguration, which must be loaded prior to instantiating the task manager.Exceptionpublic static void main(String[] args) throws IOException
args - arguments from the command lineIOExceptionpublic static boolean tryToConnect(InetAddress fromAddress, SocketAddress toSocket, int timeout) throws IOException
IOExceptionpublic TaskCancelResult cancelTask(ExecutionVertexID id) throws IOException
TaskOperationProtocolcancelTask in interface TaskOperationProtocolid - the ID of the task to cancelIOException - thrown if an error occurs during this remote procedure callpublic TaskKillResult killTask(ExecutionVertexID id) throws IOException
TaskOperationProtocolkillTask in interface TaskOperationProtocolid - the ID of the task to killIOException - thrown if an error occurs during this remote procedure callpublic List<TaskSubmissionResult> submitTasks(List<TaskDeploymentDescriptor> tasks) throws IOException
TaskOperationProtocolsubmitTasks in interface TaskOperationProtocoltasks - the tasks to be submittedIOException - thrown if an error occurs during this remote procedure callpublic LibraryCacheProfileResponse getLibraryCacheProfile(LibraryCacheProfileRequest request) throws IOException
TaskOperationProtocolLibraryCacheProfileRequest
object.getLibraryCacheProfile in interface TaskOperationProtocolrequest - a LibraryCacheProfileRequest containing a list of libraries whose cache status is to be determinedLibraryCacheProfileResponse containing the cache status for each library included in the
requestIOException - thrown if an error occurs during this remote procedure callpublic void updateLibraryCache(LibraryCacheUpdate update) throws IOException
TaskOperationProtocolupdateLibraryCache in interface TaskOperationProtocolupdate - a LibraryCacheUpdate object used to transmit the library dataIOException - thrown if an error occurs during this remote procedure callpublic void executionStateChanged(JobID jobID, ExecutionVertexID id, ExecutionState newExecutionState, String optionalDescription)
public void shutdown()
public boolean isShutDown()
true if the task manager has already been shut down, false otherwisepublic void logBufferUtilization()
TaskOperationProtocollogBufferUtilization in interface TaskOperationProtocolpublic void killTaskManager()
throws IOException
TaskOperationProtocolkillTaskManager in interface TaskOperationProtocolIOException - thrown if an error occurs during this remote procedure callpublic void invalidateLookupCacheEntries(Set<ChannelID> channelIDs) throws IOException
TaskOperationProtocolinvalidateLookupCacheEntries in interface TaskOperationProtocolchannelIDs - the channel IDs identifying the cache entries to invalidateIOException - thrown if an error occurs during this remote procedure callCopyright © 2014 The Apache Software Foundation. All rights reserved.