@RequestMapping(value = "/monitor/monitor-data-get", method = {RequestMethod.POST, RequestMethod.GET})
    public RestfulResponse monitorDataGet(MDataPaginationReq request) {
        RestfulResponse response = new RestfulResponse();
        if (request.getNodeType() == null) {
            return Builder.build(false, "nodeType can not be null.");
        }
        if (request.getStartTime() == null || request.getEndTime() == null) {
            return Builder.build(false, "Search time range must be input.");
        }
        if (StringUtils.isNotEmpty(request.getIdentity())) {
            request.setNodeGroup(null);
        }

        List<? extends MDataPo> rows = null;
        switch (request.getNodeType()) {
            case JOB_CLIENT:
                rows = appContext.getBackendJobClientMAccess().querySum(request);
                break;
            case JOB_TRACKER:
                rows = appContext.getBackendJobTrackerMAccess().querySum(request);
                break;
            case TASK_TRACKER:
                rows = appContext.getBackendTaskTrackerMAccess().querySum(request);
                break;
        }
        response.setSuccess(true);
        response.setRows(rows);
        response.setResults(CollectionUtils.sizeOf(rows));
        return response;
    }
@author Robert HG (254963746@qq.com) on 8/21/15.
lts-admin/src/main/java/com/github/ltsopensource/admin/web/api/MonitorApi.java