use of com.navercorp.pinpoint.collector.dao.hbase.statistics.CalleeColumnName in project pinpoint by naver.
the class HbaseMapStatisticsCallerDao method update.
@Override
public void update(String callerApplicationName, ServiceType callerServiceType, String callerAgentid, String calleeApplicationName, ServiceType calleeServiceType, String calleeHost, int elapsed, boolean isError) {
Objects.requireNonNull(callerApplicationName, "callerApplicationName");
Objects.requireNonNull(calleeApplicationName, "calleeApplicationName");
if (logger.isDebugEnabled()) {
logger.debug("[Caller] {} ({}) {} -> {} ({})[{}]", callerApplicationName, callerServiceType, callerAgentid, calleeApplicationName, calleeServiceType, calleeHost);
}
// there may be no endpoint in case of httpclient
calleeHost = StringUtils.defaultString(calleeHost);
// make row key. rowkey is me
final long acceptedTime = acceptedTimeService.getAcceptedTime();
final long rowTimeSlot = timeSlot.getTimeSlot(acceptedTime);
final RowKey callerRowKey = new CallRowKey(callerApplicationName, callerServiceType.getCode(), rowTimeSlot);
final short calleeSlotNumber = ApplicationMapStatisticsUtils.getSlotNumber(calleeServiceType, elapsed, isError);
HistogramSchema histogramSchema = callerServiceType.getHistogramSchema();
final ColumnName calleeColumnName = new CalleeColumnName(callerAgentid, calleeServiceType.getCode(), calleeApplicationName, calleeHost, calleeSlotNumber);
this.bulkWriter.increment(callerRowKey, calleeColumnName);
if (mapLinkConfiguration.isEnableAvg()) {
final ColumnName sumColumnName = new CalleeColumnName(callerAgentid, calleeServiceType.getCode(), calleeApplicationName, calleeHost, histogramSchema.getSumStatSlot().getSlotTime());
this.bulkWriter.increment(callerRowKey, sumColumnName, elapsed);
}
if (mapLinkConfiguration.isEnableMax()) {
final ColumnName maxColumnName = new CalleeColumnName(callerAgentid, calleeServiceType.getCode(), calleeApplicationName, calleeHost, histogramSchema.getMaxStatSlot().getSlotTime());
this.bulkWriter.updateMax(callerRowKey, maxColumnName, elapsed);
}
}
Aggregations