Search in sources :

Example 1 with ResponseColumnName

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

the class HbaseMapResponseTimeDao method received.

@Override
public void received(String applicationName, ServiceType applicationServiceType, String agentId, int elapsed, boolean isError) {
    Objects.requireNonNull(applicationName, "applicationName");
    Objects.requireNonNull(agentId, "agentId");
    if (logger.isDebugEnabled()) {
        logger.debug("[Received] {} ({})[{}]", applicationName, applicationServiceType, agentId);
    }
    // make row key. rowkey is me
    final long acceptedTime = acceptedTimeService.getAcceptedTime();
    final long rowTimeSlot = timeSlot.getTimeSlot(acceptedTime);
    final RowKey selfRowKey = new CallRowKey(applicationName, applicationServiceType.getCode(), rowTimeSlot);
    final short slotNumber = ApplicationMapStatisticsUtils.getSlotNumber(applicationServiceType, elapsed, isError);
    final ColumnName selfColumnName = new ResponseColumnName(agentId, slotNumber);
    this.bulkWriter.increment(selfRowKey, selfColumnName);
    HistogramSchema histogramSchema = applicationServiceType.getHistogramSchema();
    if (mapLinkConfiguration.isEnableAvg()) {
        final ColumnName sumColumnName = new ResponseColumnName(agentId, histogramSchema.getSumStatSlot().getSlotTime());
        this.bulkWriter.increment(selfRowKey, sumColumnName, elapsed);
    }
    final ColumnName maxColumnName = new ResponseColumnName(agentId, histogramSchema.getMaxStatSlot().getSlotTime());
    if (mapLinkConfiguration.isEnableMax()) {
        this.bulkWriter.updateMax(selfRowKey, maxColumnName, elapsed);
    }
}
Also used : ResponseColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ResponseColumnName) ColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName) ResponseColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ResponseColumnName) 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)

Example 2 with ResponseColumnName

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

the class HbaseMapResponseTimeDao method updatePing.

@Override
public void updatePing(String applicationName, ServiceType applicationServiceType, String agentId, int elapsed, boolean isError) {
    Objects.requireNonNull(applicationName, "applicationName");
    Objects.requireNonNull(agentId, "agentId");
    if (logger.isDebugEnabled()) {
        logger.debug("[Received] {} ({})[{}]", applicationName, applicationServiceType, agentId);
    }
    // make row key. rowkey is me
    final long acceptedTime = acceptedTimeService.getAcceptedTime();
    final long rowTimeSlot = timeSlot.getTimeSlot(acceptedTime);
    final RowKey selfRowKey = new CallRowKey(applicationName, applicationServiceType.getCode(), rowTimeSlot);
    final short slotNumber = ApplicationMapStatisticsUtils.getPingSlotNumber(applicationServiceType, elapsed, isError);
    final ColumnName selfColumnName = new ResponseColumnName(agentId, slotNumber);
    this.bulkWriter.increment(selfRowKey, selfColumnName);
}
Also used : ResponseColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ResponseColumnName) ColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName) ResponseColumnName(com.navercorp.pinpoint.collector.dao.hbase.statistics.ResponseColumnName) 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)

Aggregations

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