use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMapping in project incubator-skywalking by apache.
the class InstanceMappingGraph method create.
public void create() {
RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
Node<InstanceMapping, InstanceMapping> remoteNode = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.INSTANCE_MAPPING_GRAPH_ID, InstanceMapping.class).addNode(new InstanceMappingMinuteAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new InstanceMappingMinuteRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.INSTANCE_MAPPING_GRAPH_ID).create(workerCreateListener));
remoteNode.addNext(new InstanceMappingMinutePersistenceWorker.Factory(moduleManager).create(workerCreateListener));
remoteNode.addNext(new InstanceMappingHourTransformNode()).addNext(new InstanceMappingHourPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
remoteNode.addNext(new InstanceMappingDayTransformNode()).addNext(new InstanceMappingDayPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
remoteNode.addNext(new InstanceMappingMonthTransformNode()).addNext(new InstanceMappingMonthPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
}
use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMapping in project incubator-skywalking by apache.
the class InstanceMappingHourTransformNode method process.
@Override
public void process(InstanceMapping instanceMapping, Next<InstanceMapping> next) {
long timeBucket = TimeBucketUtils.INSTANCE.minuteToHour(instanceMapping.getTimeBucket());
InstanceMapping newInstanceMapping = InstanceMappingCopy.copy(instanceMapping);
newInstanceMapping.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + instanceMapping.getMetricId());
newInstanceMapping.setTimeBucket(timeBucket);
next.execute(newInstanceMapping);
}
use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMapping in project incubator-skywalking by apache.
the class InstanceMappingDayTransformNode method process.
@Override
public void process(InstanceMapping instanceMapping, Next<InstanceMapping> next) {
long timeBucket = TimeBucketUtils.INSTANCE.minuteToDay(instanceMapping.getTimeBucket());
InstanceMapping newInstanceMapping = InstanceMappingCopy.copy(instanceMapping);
newInstanceMapping.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + instanceMapping.getMetricId());
newInstanceMapping.setTimeBucket(timeBucket);
next.execute(newInstanceMapping);
}
use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMapping in project incubator-skywalking by apache.
the class InstanceMappingMonthTransformNode method process.
@Override
public void process(InstanceMapping instanceMapping, Next<InstanceMapping> next) {
long timeBucket = TimeBucketUtils.INSTANCE.minuteToMonth(instanceMapping.getTimeBucket());
InstanceMapping newInstanceMapping = InstanceMappingCopy.copy(instanceMapping);
newInstanceMapping.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + instanceMapping.getMetricId());
newInstanceMapping.setTimeBucket(timeBucket);
next.execute(newInstanceMapping);
}
use of org.apache.skywalking.apm.collector.storage.table.instance.InstanceMapping in project incubator-skywalking by apache.
the class AbstractInstanceMappingEsPersistenceDAO method esDataToStreamData.
@Override
protected final InstanceMapping esDataToStreamData(Map<String, Object> source) {
InstanceMapping instanceMapping = new InstanceMapping();
instanceMapping.setMetricId((String) source.get(InstanceMappingTable.COLUMN_METRIC_ID));
instanceMapping.setApplicationId(((Number) source.get(InstanceMappingTable.COLUMN_APPLICATION_ID)).intValue());
instanceMapping.setInstanceId(((Number) source.get(InstanceMappingTable.COLUMN_INSTANCE_ID)).intValue());
instanceMapping.setAddressId(((Number) source.get(InstanceMappingTable.COLUMN_ADDRESS_ID)).intValue());
instanceMapping.setTimeBucket(((Number) source.get(InstanceMappingTable.COLUMN_TIME_BUCKET)).longValue());
return instanceMapping;
}
Aggregations