Authored by wangning

Merge branch 'wn1020'

... ... @@ -15,7 +15,9 @@ public interface ServiceAccessMapper {
Map<String,List<String>> getTimeoutInfo(NewJavaApiInfoReq req);
Map<String,List> getGraphInfo(String context);
Map<String,List> getJavaApiGraphByServiceType(String context);
Map<String,List> getServiceNameJavaApiGraph(String source);
List<NewJavaApiDetailInfoRep> getDataByContextAndIP(NewJavaApiInfoReq req);
... ...
... ... @@ -11,7 +11,9 @@ import java.util.Map;
public interface ServiceServerExceptionMapper {
Map<String,List<String>> getErrorDataByContext(NewJavaApiInfoReq req);
Map<String,List> getGraphInfo(String context);
Map<String,List> getJavaApiGraphByServiceType(String context);
Map<String,List> getServiceNameJavaApiGraph(String source);
Map<String,List<String>> getErrorDataByContextAndIp(NewJavaApiInfoReq req);
... ...
... ... @@ -107,16 +107,16 @@ public class ServiceAccessMapperImpl extends InfluxDBQuery implements ServiceAcc
@Override
public Map<String,List> getGraphInfo(String context){
public Map<String,List> getJavaApiGraphByServiceType(String context){
Map<String,List> map = new HashMap();
String sql = String.format("SELECT mean(cost) FROM service_access WHERE time > now() - 10m and context = '%s' GROUP BY hostAddress,time(1m) fill(null)",context);
map.putAll(getGraphInfo(InfluxDBContants.AWS,sql));
map.putAll(getGraphInfo(InfluxDBContants.Q_CLOUD,sql));
map.putAll(getJavaApiGraphByServiceType(InfluxDBContants.AWS,sql));
map.putAll(getJavaApiGraphByServiceType(InfluxDBContants.Q_CLOUD,sql));
return map;
}
private Map<String,List> getGraphInfo(String source,String sql) {
private Map<String,List> getJavaApiGraphByServiceType(String source,String sql) {
Map<String,List> resultMap = new HashMap<>();
QueryResult queryResult = query(source, sql, InfluxDBContants.YOHO_EVENT);
... ... @@ -155,11 +155,51 @@ public class ServiceAccessMapperImpl extends InfluxDBQuery implements ServiceAcc
resultMap.put(hostAddress,list);
}
return resultMap;
}
@Override
public Map<String,List> getServiceNameJavaApiGraph(String source){
String sql = "SELECT mean(cost) FROM service_access WHERE time > now() - 10m GROUP BY context,time(1m) fill(null)";
Map<String,List> resultMap = new HashMap<>();
QueryResult queryResult = query(source, sql, InfluxDBContants.YOHO_EVENT);
QueryResult.Result rel = queryResult.getResults().get(0);
List<QueryResult.Series> listSeries = rel.getSeries();
if(listSeries == null)
return resultMap;
for(QueryResult.Series series : listSeries){
String context = series.getTags().get("context");
List valuesList = (List)series.getValues();
List<String> timeList = new ArrayList<>();
List<Integer> meanList = new ArrayList<>();
List list = new ArrayList<>();
for(int i=0;i<valuesList.size();i++){
List avgValueList = (List)valuesList.get(i);
String time = (String)avgValueList.get(0);
DateTime one = DateTime.parse(time);
one = one.withZone(DateTimeZone.forTimeZone(TimeZone.getTimeZone("Asia/Shanghai")));
String formatTime = one.toString("HH:mm");
timeList.add(formatTime);
if(avgValueList.get(1) == null){
meanList.add(0);
}else{
meanList.add(((Double)avgValueList.get(1)).intValue());
}
}
list.add(timeList);
list.add(meanList);
resultMap.put(context,list);
}
return resultMap;
}
@Override
public List<NewJavaApiDetailInfoRep> getDataByContextAndIP(NewJavaApiInfoReq req) {
... ...
... ... @@ -70,16 +70,16 @@ public class ServiceServerExceptionMapperImpl extends InfluxDBQuery implements S
@Override
public Map<String,List> getGraphInfo(String context){
public Map<String,List> getJavaApiGraphByServiceType(String context){
Map<String,List> map = new HashMap();
String sql = String.format("select count(stack) from service_server_exception where context = '%s' and time > now() - 10m GROUP BY hostAddress,time(1m) fill(null)",context);
map.putAll(getGraphInfo(InfluxDBContants.AWS,sql));
map.putAll(getGraphInfo(InfluxDBContants.Q_CLOUD,sql));
map.putAll(getJavaApiGraphByServiceType(InfluxDBContants.AWS,sql));
map.putAll(getJavaApiGraphByServiceType(InfluxDBContants.Q_CLOUD,sql));
return map;
}
private Map<String,List> getGraphInfo(String source,String sql) {
private Map<String,List> getJavaApiGraphByServiceType(String source,String sql) {
Map<String,List> resultMap = new HashMap<>();
QueryResult queryResult = query(source, sql, InfluxDBContants.YOMO_MONITOR);
... ... @@ -121,6 +121,47 @@ public class ServiceServerExceptionMapperImpl extends InfluxDBQuery implements S
@Override
public Map<String,List> getServiceNameJavaApiGraph(String source){
Map<String,List> resultMap = new HashMap();
String sql = "select count(stack) from service_server_exception where time > now() - 10m GROUP BY context,time(1m) fill(null)";
QueryResult queryResult = query(source, sql, InfluxDBContants.YOMO_MONITOR);
QueryResult.Result rel = queryResult.getResults().get(0);
List<QueryResult.Series> listSeries = rel.getSeries();
if(listSeries == null)
return resultMap;
for(QueryResult.Series series : listSeries) {
String context = series.getTags().get("context");
List valuesList = (List) series.getValues();
List<String> timeList = new ArrayList<>();
List<Integer> countList = new ArrayList<>();
List list = new ArrayList<>();
for (int i = 0; i < valuesList.size(); i++) {
List avgValueList = (List) valuesList.get(i);
String time = (String) avgValueList.get(0);
DateTime one = DateTime.parse(time);
one = one.withZone(DateTimeZone.forTimeZone(TimeZone.getTimeZone("Asia/Shanghai")));
String formatTime = one.toString("HH:mm");
timeList.add(formatTime);
if (avgValueList.get(1) == null) {
countList.add(0);
} else {
countList.add(((Double) avgValueList.get(1)).intValue());
}
}
list.add(timeList);
list.add(countList);
resultMap.put(context, list);
}
return resultMap;
}
@Override
public Map<String,List<String>> getErrorDataByContextAndIp(NewJavaApiInfoReq req) {
Map<String,List<String>> map = new HashMap();
String source = "";
... ...
... ... @@ -62,11 +62,23 @@ public class NewJavaApiInfoCtrl {
}
//根据serviceName获取平均耗时和异常次数的曲线图信息
@RequestMapping("/getJavaApiGraph")
@RequestMapping("/getJavaApiGraphByServiceType")
@ResponseBody
public BaseResponse getJavaApiGraph(@RequestBody NewJavaApiInfoReq req) {
public BaseResponse getJavaApiGraphByServiceType(@RequestBody NewJavaApiInfoReq req) {
log.info("getJavaApiGraph accept pram : {},{},{}",req.getServiceType(),req.getServiceName(),req.getGraphType());
Map map = newJavaApiInfoService.getJavaApiGraph(req);
Map map = newJavaApiInfoService.getJavaApiGraphByServiceType(req);
BaseResponse rep = new BaseResponse();
rep.setData(map);
return rep;
}
//获取所有服务分类的平均耗时或异常次数的曲线图信息
@RequestMapping("/getServiceNameJavaApiGraph")
@ResponseBody
public BaseResponse getServiceNameJavaApiGraph(@RequestBody NewJavaApiInfoReq req) {
log.info("getJavaApiGraph2 accept pram : {}",req.getGraphType(),req.getCloudType());
Map map = newJavaApiInfoService.getServiceNameJavaApiGraph(req);
BaseResponse rep = new BaseResponse();
rep.setData(map);
return rep;
... ... @@ -88,10 +100,20 @@ public class NewJavaApiInfoCtrl {
@RequestMapping("/queryByServiceTypeAndIP")
@ResponseBody
public BaseResponse queryByServiceTypeAndIP(@RequestBody NewJavaApiInfoReq req) {
log.info("getIPList accept pram : {},{},{},{},{},{}",req.getCloudType(),req.getServiceType(),req.getServiceName(),req.getIp(),req.getStartTime(),req.getEndTime());
log.info("getIPList accept pram : {},{},{},{},{}",req.getCloudType(),req.getServiceType(),req.getServiceName(),req.getIp(),req.getTimeInterval());
//influxdb使用的是utc时间
DateTime endDateTime = DateTime.now(DateTimeZone.UTC);
DateTime startDateTime = endDateTime.minusMinutes(req.getTimeInterval());
req.setStartTime(startDateTime.toString(DATE_TIME_FORMAT));
req.setEndTime(endDateTime.toString(DATE_TIME_FORMAT));
List<NewJavaApiDetailInfoRep> list = newJavaApiInfoService.queryByServiceTypeAndIP(req);
Map returnMap = new HashMap();
returnMap.put("startTime",req.getStartTime());
returnMap.put("endTime",req.getEndTime());
returnMap.put("content",list);
BaseResponse rep = new BaseResponse();
rep.setData(list);
rep.setData(returnMap);
return rep;
}
... ... @@ -150,7 +172,7 @@ public class NewJavaApiInfoCtrl {
for(int i = 0;i<strs.length;i++){
String ip = strs[i];
Point point = Point.measurement("service_access")
.tag("context","gateway").tag("event","/gateway2").tag("host","/gateway")
.tag("context","brower").tag("event","/brower").tag("host","/gateway")
.tag("hostAddress",ip).tag("src_service","app.product.promotion").tag("status_code","200")
.addField("cost", RandomUtils.nextInt(199) + 2000).addField("ip",ip)
.addField("stack","Total Delay [15004ms] /gateway +---[15004ms] - com.yoho.core.common.monitor.ThreadProfileInterceptor.preHandle - [enter:1476930300814,exit:1476930315818] +---[15004ms] - app.product.data. - [enter:1476930300814,exit:1476930315818]")
... ... @@ -170,7 +192,7 @@ public class NewJavaApiInfoCtrl {
for(int i = 0;i<strs.length;i++){
String ip = strs[i];
Point point = Point.measurement("service_server_exception")
.tag("context","gateway").tag("event","/gateway").tag("host","/brower/favorite/isFavorite")
.tag("context","brower").tag("event","/brower").tag("host","/brower/favorite/isFavorite")
.tag("hostAddress",ip).tag("service_name","brower/favorite/isFavorite")
.addField("ip",ip)
.addField("stack","org.apache.catalina\\n.connector.ClientAbortException: java.io.IOException: 断开的管道\\n\\tat org.apache.catalina.connector.OutputBuffer\\n.realWriteBytes(OutputBuffer.java:393)\\n\\tat org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk\\n.java:426)\\n\\tat org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:342)\\n\\tat org\\n.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:317)\\n\\tat org.apache.catalina.connector\\n.CoyoteOutputStream.flush(CoyoteOutputStream.java:110)\\n\\tat com.fasterxml.jackson.core.json.UTF8JsonGenerator\\n.flush(UTF8JsonGenerator.java:1022)\\n\\tat com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter\\n.java:891)\\n\\tat org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.writeInternal\\n(AbstractJackson2HttpMessageConverter.java:264)\\n\\tat org.springframework.http.converter.AbstractGenericHttpMessageConverter\\n.write(AbstractGenericHttpMessageConverter.java:100)\\n\\tat org.springframework.web.servlet.mvc.method\\n.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor\\n.java:202)\\n\\tat org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor\\n.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:133)\\n\\tat org.springframework\\n.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor\\n.java:165)\\n\\tat org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue\\n(HandlerMethodReturnValueHandlerComposite.java:80)\\n\\tat org.springframework.web.servlet.mvc.method.annotation\\n.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:126)\\n\\tat org.springframework\\n.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter\\n.java:806)\\n\\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal\\n(RequestMappingHandlerAdapter.java:729)\\n\\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter\\n.handle(AbstractHandlerMethodAdapter.java:85)\\n\\tat org.springframework.web.servlet.DispatcherServlet\\n.doDispatch(DispatcherServlet.java:959)\\n\\tat org.springframework.web.servlet.DispatcherServlet.doService\\n(DispatcherServlet.java:893)\\n\\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet\\n.java:970)\\n\\tat org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)\\n\\n\\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:648)\\n\\tat org.springframework.web.servlet\\n.FrameworkServlet.service(FrameworkServlet.java:846)\\n\\tat javax.servlet.http.HttpServlet.service(HttpServlet\\n.java:729)\\n\\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain\\n.java:291)\\n\\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java\\n:206)\\n\\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)\\n\\tat org.apache.catalina\\n.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\\n\\tat org.apache.catalina\\n.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\\n\\tat org.springframework.web\\n.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)\\n\\tat org.springframework\\n.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)\\n\\tat org.apache.catalina.core\\n.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)\\n\\tat org.apache.catalina.core\\n.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)\\n\\tat org.apache.catalina.core.StandardWrapperValve\\n.invoke(StandardWrapperValve.java:217)\\n\\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve\\n.java:106)\\n\\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502\\n)\\n\\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)\\n\\tat org.apache\\n.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)\\n\\tat org.apache.catalina.core.StandardEngineValve\\n.invoke(StandardEngineValve.java:88)\\n\\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter\\n.java:518)\\n\\tat org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java\\n:1091)\\n\\tat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java\\n:673)\\n\\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)\\n\\tat\\n org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)\\n\\tat java.util.concurrent\\n.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\\n\\tat java.util.concurrent.ThreadPoolExecutor$Worker\\n.run(ThreadPoolExecutor.java:617)\\n\\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run\\n(TaskThread.java:61)\\n\\tat java.lang.Thread.run(Thread.java:745)\\nCaused by: java.io.IOException: 断开\\n的管道\\n\\tat sun.nio.ch.FileDispatcherImpl.write0(Native Method)\\n\\tat sun.nio.ch.SocketDispatcher.write\\n(SocketDispatcher.java:47)\\n\\tat sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)\\n\\tat sun.nio\\n.ch.IOUtil.write(IOUtil.java:65)\\n\\tat sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471\\n)\\n\\tat org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:124)\\n\\tat org.apache.tomcat.util\\n.net.NioBlockingSelector.write(NioBlockingSelector.java:101)\\n\\tat org.apache.tomcat.util.net.NioSelectorPool\\n.write(NioSelectorPool.java:172)\\n\\tat org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket\\n(InternalNioOutputBuffer.java:139)\\n\\tat org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer\\n.java:197)\\n\\tat org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer\\n.java:41)\\n\\tat org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer\\n.java:320)\\n\\tat org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java\\n:118)\\n\\tat org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)\\n\\tat\\n org.apache.coyote.Response.doWrite(Response.java:501)\\n\\tat org.apache.catalina.connector.OutputBuffer\\n.realWriteBytes(OutputBuffer.java:388)\\n\\t... 47 more\\n")
... ...
... ... @@ -13,7 +13,9 @@ import java.util.Map;
public interface NewJavaApiInfoService {
List<NewJavaApiInfoRep> getJavaApiStatus(NewJavaApiInfoReq req);
Map getJavaApiGraph(NewJavaApiInfoReq req);
Map getJavaApiGraphByServiceType(NewJavaApiInfoReq req);
Map getServiceNameJavaApiGraph(NewJavaApiInfoReq req);
List<String> getIPList(NewJavaApiInfoReq req);
... ...
... ... @@ -2,6 +2,7 @@ package com.monitor.javaserver.service.impl;
import com.model.MObjectInfo;
import com.model.TypeInfo;
import com.monitor.influxdb.contants.InfluxDBContants;
import com.monitor.influxdb.mapper.ServiceAccessMapper;
import com.monitor.influxdb.mapper.ServiceServerExceptionMapper;
import com.monitor.influxdb.mapper.VMInfoMapper;
... ... @@ -73,6 +74,10 @@ public class NewJavaApiInfoServiceImpl implements NewJavaApiInfoService {
resp.setErrorCount(errorInfoMap.get(ip) == null ? 0 : errorInfoMap.get(ip).size());
resp.setErrorInfo(errorInfoMap.get(ip));
resp.setTimeoutInfo(timeoutInfoMap.get(ip));
if(req.getServiceType() == -1){
resp.setServiceNames(mObjectInfo.getMoName());
}
List vmList = (List)vmInfoMap.get(ip);
if(vmList != null){
... ... @@ -89,7 +94,7 @@ public class NewJavaApiInfoServiceImpl implements NewJavaApiInfoService {
@Override
public Map getJavaApiGraph(NewJavaApiInfoReq req){
public Map getJavaApiGraphByServiceType(NewJavaApiInfoReq req){
Map returnMap = new HashMap();
List<MObjectInfo> objectInfoList = getMObjectInfoList(req);
... ... @@ -98,9 +103,9 @@ public class NewJavaApiInfoServiceImpl implements NewJavaApiInfoService {
}
Map<String,List> map = null;
if(req.getGraphType()==2){
map = serviceServerExceptionMapper.getGraphInfo(req.getServiceName());
map = serviceServerExceptionMapper.getJavaApiGraphByServiceType(req.getServiceName());
}else{
map = serviceAccessMapper.getGraphInfo(req.getServiceName());
map = serviceAccessMapper.getJavaApiGraphByServiceType(req.getServiceName());
}
List<String> timeList = new ArrayList<String>();
... ... @@ -135,6 +140,53 @@ public class NewJavaApiInfoServiceImpl implements NewJavaApiInfoService {
}
@Override
public Map getServiceNameJavaApiGraph(NewJavaApiInfoReq req){
Map returnMap = new HashMap();
List<TypeInfo> typeInfoList = mTypeInfoMapper.getChildTypesInfoByAlias("java_app");
if(CollectionUtils.isEmpty(typeInfoList)){
return null;
}
String source = "";
if(req.getCloudType() == 2){
source = InfluxDBContants.Q_CLOUD;
}else{
source = InfluxDBContants.AWS;
}
Map<String,List> map = null;
if(req.getGraphType()==2){
map = serviceServerExceptionMapper.getServiceNameJavaApiGraph(source);
}else{
map = serviceAccessMapper.getServiceNameJavaApiGraph(source);
}
List<String> timeList = new ArrayList<String>();
List contentList = new ArrayList<>();
for(TypeInfo typeInfo :typeInfoList){
Map dataMap = new HashMap();
String typeName = typeInfo.getTypeName();
List list = map.get(typeName);
if(list != null && list.size() > 0){
if(timeList.size()==0){
timeList = (List)list.get(0);
}
dataMap.put("data",list.get(1));
}else{
dataMap.put("data",new ArrayList<>());
}
dataMap.put("name",typeName);
contentList.add(dataMap);
}
returnMap.put("time",timeList);
returnMap.put("content",contentList);
return returnMap;
}
@Override
public List<String> getIPList(NewJavaApiInfoReq req){
... ... @@ -177,16 +229,7 @@ public class NewJavaApiInfoServiceImpl implements NewJavaApiInfoService {
private List<MObjectInfo> getMObjectInfoList(NewJavaApiInfoReq req){
//servicetype=-1表示查询全部 0表示gateway
if(req.getServiceType() == -1){
List<TypeInfo> typeInfoList = mTypeInfoMapper.getChildTypesInfoByAlias("java_app");
if(CollectionUtils.isEmpty(typeInfoList)){
return null;
}
List<Integer> typeList = new ArrayList<>();
for(TypeInfo typeInfo : typeInfoList){
typeList.add(typeInfo.getTypeId());
}
List<MObjectInfo> objectInfoList = mObjectInfoMapper.selectMObjectsInfoByTypes(typeList);
List<MObjectInfo> objectInfoList = mObjectInfoMapper.selectJavaDistinctHostIP();
return objectInfoList;
}
... ... @@ -201,15 +244,6 @@ public class NewJavaApiInfoServiceImpl implements NewJavaApiInfoService {
List<MObjectInfo> objectInfoList = mObjectInfoMapper.getTypeMosInfo(req.getServiceType());
return objectInfoList;
// if(req.getServiceType() == 0){
// TypeInfo typeInfo = mTypeInfoMapper.selectTypeInfoByName(req.getServiceName());
// if(typeInfo == null){
// return null;
// }
// req.setServiceType(typeInfo.getTypeId());
// }
// List<MObjectInfo> objectInfoList = mObjectInfoMapper.getTypeMosInfo(req.getServiceType());
// return objectInfoList;
}
@Override
... ...
... ... @@ -16,6 +16,7 @@ public class NewJavaApiInfoRep {
private String cpuRate = "";
private String memoryRate = "";
private String bandwidth = "";
private String serviceNames;
public String getIp() {
return ip;
... ... @@ -98,4 +99,12 @@ public class NewJavaApiInfoRep {
public void setTimeoutInfo(List<String> timeoutInfo) {
this.timeoutInfo = timeoutInfo;
}
public String getServiceNames() {
return serviceNames;
}
public void setServiceNames(String serviceNames) {
this.serviceNames = serviceNames;
}
}
... ...
... ... @@ -26,5 +26,7 @@ public interface MObjectInfoMapper {
List<MObjectInfo> selectDistinctHostIPByTypes(List<Integer> typeIds);
List<MObjectInfo> selectJavaDistinctHostIP();
/* List<MObjectInfo> getHostMosInfo(int hostId);*/
}
... ...
... ... @@ -68,4 +68,10 @@
order by host_ip DESC
</select>
<select id="selectJavaDistinctHostIP" resultType="com.model.MObjectInfo" resultMap="mobjectInfoMapper">
SELECT b.`host_ip`,GROUP_CONCAT(a.`alias`) alias FROM `type_info` a,`mobject_info` b
WHERE a.`id` = b.`type_id` AND a.`parent_id` = (SELECT id FROM `type_info` t WHERE t.`alias` = 'java_app') GROUP BY b.`host_ip`
</select>
</mapper>
\ No newline at end of file
... ...