@Override public GetMetricsTagsResponse doRun() throws Exception { GetMetricsTagsResponse rt = new GetMetricsTagsResponse(); MetricsTags.getInstance() .findMetricsTags(request.getMetricsQuery(), rt.getTimeSeriesTagsList()); String remoteIp = CommonUtil.getRemoteIP(httpRequest); if (remoteIp == null || remoteIp.isEmpty()) { remoteIp = CommonUtil.getRemoteIP(channel); } rt.setResultCode(InterfaceConst.ResultCode.SUCCESS); rt.setResultInfo("success"); return rt; }
private GetMetricsTagsResponse generateFailedResponse(int resultCode, String resultInfo) { GetMetricsTagsResponse rt = new GetMetricsTagsResponse(); rt.setResultCode(resultCode); rt.setResultInfo(resultInfo); return rt; }