use of alluxio.wire.MasterWebUIWorkers in project alluxio by Alluxio.
the class AlluxioMasterRestServiceHandler method getWebUIWorkers.
/**
* Gets Web UI workers page data.
*
* @return the response object
*/
@GET
@Path(WEBUI_WORKERS)
public Response getWebUIWorkers() {
return RestUtils.call(() -> {
MasterWebUIWorkers response = new MasterWebUIWorkers();
response.setDebug(ServerConfiguration.getBoolean(PropertyKey.DEBUG));
List<WorkerInfo> workerInfos = mBlockMaster.getWorkerInfoList();
NodeInfo[] normalNodeInfos = WebUtils.generateOrderedNodeInfos(workerInfos);
response.setNormalNodeInfos(normalNodeInfos);
List<WorkerInfo> lostWorkerInfos = mBlockMaster.getLostWorkersInfoList();
NodeInfo[] failedNodeInfos = WebUtils.generateOrderedNodeInfos(lostWorkerInfos);
response.setFailedNodeInfos(failedNodeInfos);
return response;
}, ServerConfiguration.global());
}
Aggregations