Search in sources :

Example 1 with ColumnName

use of com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName 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 ColumnName

use of com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName 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)

Example 3 with ColumnName

use of com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName 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)

Example 4 with ColumnName

use of com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName 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)4 ColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.ColumnName)4 RowKey (com.navercorp.pinpoint.collector.dao.hbase.statistics.RowKey)4 HistogramSchema (com.navercorp.pinpoint.common.trace.HistogramSchema)3 ResponseColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.ResponseColumnName)2 CalleeColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.CalleeColumnName)1 CallerColumnName (com.navercorp.pinpoint.collector.dao.hbase.statistics.CallerColumnName)1