use of com.navercorp.pinpoint.thrift.dto.flink.TFActiveTrace in project pinpoint by naver.
the class JoinActiveTraceBoMapper method map.
@Override
public JoinActiveTraceBo map(TFAgentStat tFAgentStat) {
if (!tFAgentStat.isSetActiveTrace()) {
return JoinActiveTraceBo.EMPTY_JOIN_ACTIVE_TRACE_BO;
}
final TFActiveTrace tFactiveTrace = tFAgentStat.getActiveTrace();
final String agentId = tFAgentStat.getAgentId();
if (tFactiveTrace.isSetHistogram() == false) {
return JoinActiveTraceBo.EMPTY_JOIN_ACTIVE_TRACE_BO;
}
final TFActiveTraceHistogram histogram = tFactiveTrace.getHistogram();
final int totalCount = calculateTotalCount(tFactiveTrace.getHistogram());
JoinActiveTraceBo joinActiveTraceBo = new JoinActiveTraceBo();
joinActiveTraceBo.setId(agentId);
joinActiveTraceBo.setTimestamp(tFAgentStat.getTimestamp());
joinActiveTraceBo.setHistogramSchemaType(histogram.getHistogramSchemaType());
joinActiveTraceBo.setVersion(histogram.getVersion());
joinActiveTraceBo.setTotalCountJoinValue(new JoinIntFieldBo(totalCount, totalCount, agentId, totalCount, agentId));
return joinActiveTraceBo;
}
Aggregations