public Map<String, LSWorkerHeartbeat> readWorkerHeartbeatsImpl(Map<String, Object> conf) { Map<String, LSWorkerHeartbeat> workerHeartbeats = new HashMap<>(); Collection<String> workerIds = SupervisorUtils.supervisorWorkerIds(conf); for (String workerId : workerIds) { LSWorkerHeartbeat whb = readWorkerHeartbeat(conf, workerId); // ATTENTION: whb can be null workerHeartbeats.put(workerId, whb); } return workerHeartbeats; }
public Map<String, LSWorkerHeartbeat> readWorkerHeartbeatsImpl(Map<String, Object> conf) throws Exception { Map<String, LSWorkerHeartbeat> workerHeartbeats = new HashMap<>(); Collection<String> workerIds = SupervisorUtils.supervisorWorkerIds(conf); for (String workerId : workerIds) { LSWorkerHeartbeat whb = readWorkerHeartbeat(conf, workerId); // ATTENTION: whb can be null workerHeartbeats.put(workerId, whb); } return workerHeartbeats; }