use of com.tencent.angel.master.worker.worker.AMWorkerEvent in project angel by Tencent.
the class WorkerManager method startAllWorker.
/**
* init and start all workers
*/
public void startAllWorker() {
LOG.info("to start all workers.....");
try {
writeLock.lock();
initWorkers();
for (int i = 0; i < workerGroupMap.size(); i++) {
AMWorkerGroup group = workerGroupMap.get(new WorkerGroupId(i));
for (AMWorker worker : group.getWorkerSet()) {
worker.handle(new AMWorkerEvent(AMWorkerEventType.SCHEDULE, worker.getId()));
}
}
isInited = true;
} finally {
writeLock.unlock();
}
}
Aggregations