Authored by wangning

.分隔符处理修改

... ... @@ -275,27 +275,25 @@ public class TraceAnalyzeHandler implements TraceHandler, Serializable {
public Iterator<Tuple2<String, SpanIpResult>> call(Tuple2<String, SortedTrace> tuple2) throws Exception {
List<Tuple2<String, SpanIpResult>> resultList = Lists.newArrayList();
String minuteStart = tuple2._1.split("\\.")[0];
String traceMD5 = tuple2._1.split("\\.")[1];
String minuteStart = StringUtils.split(tuple2._1, '.')[0];
String traceMD5 = StringUtils.split(tuple2._1, '.')[1];
SortedTrace sortTrace = tuple2._2;
List<SpanInfo> sortSpanList = sortTrace.getSortSpanList();
for (SpanInfo spanInfo : sortSpanList) {
String ip = "";
//只有root和resttemplate才会生成ip
// if(spanInfo.getTraceid().equals(spanInfo.getSpanid())){
// ip = spanInfo.getIp();
// }else{
// if(StringUtils.isNotBlank(spanInfo.getHttpHost())){
// ip = spanInfo.getHttpHost();
// }
// }
ip = spanInfo.getIp();
if(spanInfo.getTraceid().equals(spanInfo.getSpanid())){
ip = spanInfo.getIp();
}else{
if(StringUtils.isNotBlank(spanInfo.getHttpHost())){
ip = spanInfo.getHttpHost();
}
}
// if(StringUtils.isBlank(ip)){
// continue;
// }
if(StringUtils.isBlank(ip)){
continue;
}
SpanIpResult spanIpResult = new SpanIpResult();
String spanName = spanInfo.getName();
... ...