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()));
}
Aggregations