Showing
1 changed file
with
7 additions
and
1 deletions
@@ -101,10 +101,16 @@ public class MaliciousIpMapperImpl extends InfluxDBQuery implements MaliciousIpM | @@ -101,10 +101,16 @@ public class MaliciousIpMapperImpl extends InfluxDBQuery implements MaliciousIpM | ||
101 | 101 | ||
102 | for(List<Object> ls : s.getValues()){ | 102 | for(List<Object> ls : s.getValues()){ |
103 | Map<String,String> m = new HashMap(); | 103 | Map<String,String> m = new HashMap(); |
104 | - m.put("createtime",""+ ls.get(s.getColumns().indexOf("createtime"))==null?"":String.valueOf(ls.get(s.getColumns().indexOf("createtime")))); | 104 | + |
105 | m.put("reason",(String) ls.get(s.getColumns().indexOf("reason"))); | 105 | m.put("reason",(String) ls.get(s.getColumns().indexOf("reason"))); |
106 | m.put("dur",(String) ls.get(s.getColumns().indexOf("dur"))); | 106 | m.put("dur",(String) ls.get(s.getColumns().indexOf("dur"))); |
107 | + if(s.getColumns().indexOf("createtime")>=0){ | ||
108 | + m.put("createtime",""+ ls.get(s.getColumns().indexOf("hbasetime"))==null?"":String.valueOf(ls.get(s.getColumns().indexOf("createtime")))); | ||
109 | + } | ||
110 | + if(s.getColumns().indexOf("hbasetime")>=0){ | ||
107 | m.put("hbasetime", ls.get(s.getColumns().indexOf("hbasetime"))==null?"":String.valueOf(ls.get(s.getColumns().indexOf("hbasetime")))); | 111 | m.put("hbasetime", ls.get(s.getColumns().indexOf("hbasetime"))==null?"":String.valueOf(ls.get(s.getColumns().indexOf("hbasetime")))); |
112 | + } | ||
113 | + | ||
108 | resultMap.put(ip,m); | 114 | resultMap.put(ip,m); |
109 | } | 115 | } |
110 | } | 116 | } |
-
Please register or login to post a comment