Search in sources :

Example 1 with MasterWebUIWorkers

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());
}
Also used : NodeInfo(alluxio.util.webui.NodeInfo) WorkerInfo(alluxio.wire.WorkerInfo) MasterWebUIWorkers(alluxio.wire.MasterWebUIWorkers) Path(javax.ws.rs.Path) GET(javax.ws.rs.GET)

Aggregations

NodeInfo (alluxio.util.webui.NodeInfo)1 MasterWebUIWorkers (alluxio.wire.MasterWebUIWorkers)1 WorkerInfo (alluxio.wire.WorkerInfo)1 GET (javax.ws.rs.GET)1 Path (javax.ws.rs.Path)1