Search in sources :

Example 1 with TaskExecutorManager

use of alluxio.worker.job.task.TaskExecutorManager in project alluxio by Alluxio.

the class JobWorker method start.

@Override
public void start(WorkerNetAddress address) throws IOException {
    super.start(address);
    // Start serving metrics system, this will not block
    MetricsSystem.startSinks(ServerConfiguration.getString(PropertyKey.METRICS_CONF_FILE));
    try {
        JobWorkerIdRegistry.registerWorker(mJobMasterClient, address);
    } catch (ConnectionFailedException e) {
        LOG.error("Failed to connect to job master", e);
        throw Throwables.propagate(e);
    }
    mTaskExecutorManager = new TaskExecutorManager(ServerConfiguration.getInt(PropertyKey.JOB_WORKER_THREADPOOL_SIZE), address);
    mCommandHandlingService = getExecutorService().submit(new HeartbeatThread(HeartbeatContext.JOB_WORKER_COMMAND_HANDLING, new CommandHandlingExecutor(mJobServerContext, mTaskExecutorManager, mJobMasterClient, address), (int) ServerConfiguration.getMs(PropertyKey.JOB_MASTER_WORKER_HEARTBEAT_INTERVAL), ServerConfiguration.global(), ServerUserState.global()));
}
Also used : TaskExecutorManager(alluxio.worker.job.task.TaskExecutorManager) HeartbeatThread(alluxio.heartbeat.HeartbeatThread) CommandHandlingExecutor(alluxio.worker.job.command.CommandHandlingExecutor) ConnectionFailedException(alluxio.exception.ConnectionFailedException)

Aggregations

ConnectionFailedException (alluxio.exception.ConnectionFailedException)1 HeartbeatThread (alluxio.heartbeat.HeartbeatThread)1 CommandHandlingExecutor (alluxio.worker.job.command.CommandHandlingExecutor)1 TaskExecutorManager (alluxio.worker.job.task.TaskExecutorManager)1