コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
 /** @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;
 }