Search in sources :

Example 1 with CallerColumnName

use of com.navercorp.pinpoint.collector.dao.hbase.statistics.CallerColumnName in project pinpoint by naver.

the class HbaseMapStatisticsCalleeDao method update.

@Override
public void update(String calleeApplicationName, ServiceType calleeServiceType, String callerApplicationName, ServiceType callerServiceType, String callerHost, int elapsed, boolean isError) {
    Objects.requireNonNull(calleeApplicationName, "calleeApplicationName");
    Objects.requireNonNull(callerApplicationName, "callerApplicationName");
    if (logger.isDebugEnabled()) {
        logger.debug("[Callee] {} ({}) <- {} ({})[{}]", calleeApplicationName, calleeServiceType, callerApplicationName, callerServiceType, callerHost);
    }
    // there may be no endpoint in case of httpclient
    callerHost = StringUtils.defaultString(callerHost);
    // TODO callee, caller parameter normalization
    if (ignoreStatFilter.filter(calleeServiceType, callerHost)) {
        logger.debug("[Ignore-Callee] {} ({}) <- {} ({})[{}]", calleeApplicationName, calleeServiceType, callerApplicationName, callerServiceType, callerHost);
        return;
    }
    // make row key. rowkey is me
    final long acceptedTime = acceptedTimeService.getAcceptedTime();
    final long rowTimeSlot = timeSlot.getTimeSlot(acceptedTime);
    final RowKey calleeRowKey = new CallRowKey(calleeApplicationName, calleeServiceType.getCode(), rowTimeSlot);
    final short callerSlotNumber = ApplicationMapStatisticsUtils.getSlotNumber(calleeServiceType, elapsed, isError);
    HistogramSchema histogramSchema = calleeServiceType.getHistogramSchema();
    final ColumnName callerColumnName = new CallerColumnName(callerServiceType.getCode(), callerApplicationName, callerHost, callerSlotNumber);
    this.bulkWriter.increment(calleeRowKey, callerColumnName);
    if (mapLinkConfiguration.isEnableAvg()) {
        final ColumnName sumColumnName = new CallerColumnName(callerServiceType.getCode(), callerApplicationName, callerHost, histogramSchema.getSumStatSlot().getSlotTime());
        this.bulkWriter.increment(calleeRowKey, sumColumnName, elapsed);
    }
    if (mapLinkConfiguration.isEnableMax()) {
        final ColumnName maxColumnName = new CallerColumnName(callerServiceType.getCode(), callerApplicationName, callerHost, histogramSchema.getMaxStatSlot().getSlotTime());
        this.bulkWriter.updateMax(calleeRowKey, maxColumnName, elapsed);
    }
}
Also used : ColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName) CallerColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.CallerColumnName) 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) CallerColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.CallerColumnName)

Aggregations

CallRowKey (com.navercorp.pinpoint.collector.dao.hbase.statistics.CallRowKey)1 CallerColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.CallerColumnName)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