/** * Gets info about the lost workers. * * @return a set of worker info */ public Set<WorkerInfo> getLostWorkersInfo() { Set<WorkerInfo> ret = new HashSet<>(mLostWorkers.size()); for (MasterWorkerInfo worker : mLostWorkers) { synchronized (worker) { ret.add(worker.generateClientWorkerInfo()); } } return ret; }
/** @return a list of {@link WorkerInfo} objects representing the workers in Alluxio */ public List<WorkerInfo> getWorkerInfoList() { List<WorkerInfo> workerInfoList = new ArrayList<>(mWorkers.size()); for (MasterWorkerInfo worker : mWorkers) { synchronized (worker) { workerInfoList.add(worker.generateClientWorkerInfo()); } } return workerInfoList; }