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);
}
}
Aggregations