Search in sources :

Example 1 with CalleeColumnName

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);
    }
}
Also used : ColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName) CalleeColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.CalleeColumnName) HistogramSchema(com.navercorp.pinpoint.common.trace.HistogramSchema) CallRowKey(com.navercorp.pinpoint.collector.dao.hbase.statistics.CallRowKey) CallRowKey(com.navercorp.pinpoint.collector.dao.hbase.statistics.CallRowKey) RowKey(com.navercorp.pinpoint.collector.dao.hbase.statistics.RowKey) CalleeColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.CalleeColumnName)

Aggregations

CallRowKey (com.navercorp.pinpoint.collector.dao.hbase.statistics.CallRowKey)1 CalleeColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.CalleeColumnName)1 ColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName)1 RowKey (com.navercorp.pinpoint.collector.dao.hbase.statistics.RowKey)1 HistogramSchema (com.navercorp.pinpoint.common.trace.HistogramSchema)1