use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric in project incubator-skywalking by apache.
the class AbstractInstanceMetricEsPersistenceDAO method esDataToStreamData.
@Override
protected final InstanceMetric esDataToStreamData(Map<String, Object> source) {
InstanceMetric instanceMetric = new InstanceMetric();
instanceMetric.setMetricId((String) source.get(InstanceMetricTable.COLUMN_METRIC_ID));
instanceMetric.setApplicationId((Integer) source.get(InstanceMetricTable.COLUMN_APPLICATION_ID));
instanceMetric.setInstanceId((Integer) source.get(InstanceMetricTable.COLUMN_INSTANCE_ID));
instanceMetric.setSourceValue((Integer) source.get(InstanceMetricTable.COLUMN_SOURCE_VALUE));
instanceMetric.setTransactionCalls(((Number) source.get(InstanceMetricTable.COLUMN_TRANSACTION_CALLS)).longValue());
instanceMetric.setTransactionErrorCalls(((Number) source.get(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS)).longValue());
instanceMetric.setTransactionDurationSum(((Number) source.get(InstanceMetricTable.COLUMN_TRANSACTION_DURATION_SUM)).longValue());
instanceMetric.setTransactionErrorDurationSum(((Number) source.get(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM)).longValue());
instanceMetric.setTransactionAverageDuration(((Number) source.get(InstanceMetricTable.COLUMN_TRANSACTION_AVERAGE_DURATION)).longValue());
instanceMetric.setBusinessTransactionCalls(((Number) source.get(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS)).longValue());
instanceMetric.setBusinessTransactionErrorCalls(((Number) source.get(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS)).longValue());
instanceMetric.setBusinessTransactionDurationSum(((Number) source.get(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM)).longValue());
instanceMetric.setBusinessTransactionErrorDurationSum(((Number) source.get(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM)).longValue());
instanceMetric.setBusinessTransactionAverageDuration(((Number) source.get(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_AVERAGE_DURATION)).longValue());
instanceMetric.setMqTransactionCalls(((Number) source.get(InstanceMetricTable.COLUMN_MQ_TRANSACTION_CALLS)).longValue());
instanceMetric.setMqTransactionErrorCalls(((Number) source.get(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS)).longValue());
instanceMetric.setMqTransactionDurationSum(((Number) source.get(InstanceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM)).longValue());
instanceMetric.setMqTransactionErrorDurationSum(((Number) source.get(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM)).longValue());
instanceMetric.setMqTransactionAverageDuration(((Number) source.get(InstanceMetricTable.COLUMN_MQ_TRANSACTION_AVERAGE_DURATION)).longValue());
instanceMetric.setTimeBucket(((Number) source.get(InstanceMetricTable.COLUMN_TIME_BUCKET)).longValue());
return instanceMetric;
}
use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric in project incubator-skywalking by apache.
the class InstanceMetricCopy method copy.
public static InstanceMetric copy(InstanceMetric instanceMetric) {
InstanceMetric newInstanceMetric = new InstanceMetric();
newInstanceMetric.setId(instanceMetric.getId());
newInstanceMetric.setMetricId(instanceMetric.getMetricId());
newInstanceMetric.setSourceValue(instanceMetric.getSourceValue());
newInstanceMetric.setApplicationId(instanceMetric.getApplicationId());
newInstanceMetric.setInstanceId(instanceMetric.getInstanceId());
newInstanceMetric.setTransactionCalls(instanceMetric.getTransactionCalls());
newInstanceMetric.setTransactionDurationSum(instanceMetric.getTransactionDurationSum());
newInstanceMetric.setTransactionErrorCalls(instanceMetric.getTransactionErrorCalls());
newInstanceMetric.setTransactionErrorDurationSum(instanceMetric.getTransactionErrorDurationSum());
newInstanceMetric.setBusinessTransactionCalls(instanceMetric.getBusinessTransactionCalls());
newInstanceMetric.setBusinessTransactionDurationSum(instanceMetric.getBusinessTransactionDurationSum());
newInstanceMetric.setBusinessTransactionErrorCalls(instanceMetric.getBusinessTransactionErrorCalls());
newInstanceMetric.setBusinessTransactionErrorDurationSum(instanceMetric.getBusinessTransactionErrorDurationSum());
newInstanceMetric.setMqTransactionCalls(instanceMetric.getMqTransactionCalls());
newInstanceMetric.setMqTransactionDurationSum(instanceMetric.getMqTransactionDurationSum());
newInstanceMetric.setMqTransactionErrorCalls(instanceMetric.getMqTransactionErrorCalls());
newInstanceMetric.setMqTransactionErrorDurationSum(instanceMetric.getMqTransactionErrorDurationSum());
newInstanceMetric.setTimeBucket(instanceMetric.getTimeBucket());
return newInstanceMetric;
}
use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric in project incubator-skywalking by apache.
the class InstanceMonthMetricTransformNode method process.
@Override
public void process(InstanceMetric instanceMetric, Next<InstanceMetric> next) {
long timeBucket = TimeBucketUtils.INSTANCE.minuteToMonth(instanceMetric.getTimeBucket());
InstanceMetric newInstanceMetric = InstanceMetricCopy.copy(instanceMetric);
newInstanceMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + instanceMetric.getMetricId());
newInstanceMetric.setTimeBucket(timeBucket);
next.execute(newInstanceMetric);
}
use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric in project incubator-skywalking by apache.
the class InstanceHourMetricTransformNode method process.
@Override
public void process(InstanceMetric instanceMetric, Next<InstanceMetric> next) {
long timeBucket = TimeBucketUtils.INSTANCE.minuteToHour(instanceMetric.getTimeBucket());
InstanceMetric newInstanceMetric = InstanceMetricCopy.copy(instanceMetric);
newInstanceMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + instanceMetric.getMetricId());
newInstanceMetric.setTimeBucket(timeBucket);
next.execute(newInstanceMetric);
}
Aggregations