Search in sources :

Example 1 with ApplicationMapping

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping in project incubator-skywalking by apache.

the class AbstractApplicationMappingEsPersistenceDAO method esDataToStreamData.

@Override
protected final ApplicationMapping esDataToStreamData(Map<String, Object> source) {
    ApplicationMapping applicationMapping = new ApplicationMapping();
    applicationMapping.setMetricId((String) source.get(ApplicationMappingTable.COLUMN_METRIC_ID));
    applicationMapping.setApplicationId(((Number) source.get(ApplicationMappingTable.COLUMN_APPLICATION_ID)).intValue());
    applicationMapping.setMappingApplicationId(((Number) source.get(ApplicationMappingTable.COLUMN_MAPPING_APPLICATION_ID)).intValue());
    applicationMapping.setTimeBucket(((Number) source.get(ApplicationMappingTable.COLUMN_TIME_BUCKET)).longValue());
    return applicationMapping;
}
Also used : ApplicationMapping(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping)

Example 2 with ApplicationMapping

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping in project incubator-skywalking by apache.

the class AbstractApplicationMappingH2PersistenceDAO method h2DataToStreamData.

@Override
protected final ApplicationMapping h2DataToStreamData(ResultSet resultSet) throws SQLException {
    ApplicationMapping applicationMapping = new ApplicationMapping();
    applicationMapping.setId(resultSet.getString(ApplicationMappingTable.COLUMN_ID));
    applicationMapping.setMetricId(resultSet.getString(ApplicationMappingTable.COLUMN_METRIC_ID));
    applicationMapping.setApplicationId(resultSet.getInt(ApplicationMappingTable.COLUMN_APPLICATION_ID));
    applicationMapping.setMappingApplicationId(resultSet.getInt(ApplicationMappingTable.COLUMN_MAPPING_APPLICATION_ID));
    applicationMapping.setTimeBucket(resultSet.getLong(ApplicationMappingTable.COLUMN_TIME_BUCKET));
    return applicationMapping;
}
Also used : ApplicationMapping(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping)

Example 3 with ApplicationMapping

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping in project incubator-skywalking by apache.

the class ApplicationMappingCopy method copy.

public static ApplicationMapping copy(ApplicationMapping applicationMapping) {
    ApplicationMapping newApplicationMapping = new ApplicationMapping();
    newApplicationMapping.setId(applicationMapping.getId());
    newApplicationMapping.setMetricId(applicationMapping.getMetricId());
    newApplicationMapping.setTimeBucket(applicationMapping.getTimeBucket());
    newApplicationMapping.setApplicationId(applicationMapping.getApplicationId());
    newApplicationMapping.setMappingApplicationId(applicationMapping.getMappingApplicationId());
    return newApplicationMapping;
}
Also used : ApplicationMapping(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping)

Example 4 with ApplicationMapping

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping in project incubator-skywalking by apache.

the class ApplicationMappingSpanListener method parseEntry.

@Override
public void parseEntry(SpanDecorator spanDecorator, int applicationId, int instanceId, String segmentId) {
    logger.debug("application mapping listener parse reference");
    if (!spanDecorator.getSpanLayer().equals(SpanLayer.MQ)) {
        if (spanDecorator.getRefsCount() > 0) {
            for (int i = 0; i < spanDecorator.getRefsCount(); i++) {
                ApplicationMapping applicationMapping = new ApplicationMapping();
                applicationMapping.setApplicationId(applicationId);
                int addressId = spanDecorator.getRefs(i).getNetworkAddressId();
                int mappingApplicationId = applicationCacheService.getApplicationIdByAddressId(addressId);
                applicationMapping.setMappingApplicationId(mappingApplicationId);
                String metricId = String.valueOf(applicationId) + Const.ID_SPLIT + String.valueOf(applicationMapping.getMappingApplicationId());
                applicationMapping.setMetricId(metricId);
                applicationMappings.add(applicationMapping);
            }
        }
    }
}
Also used : ApplicationMapping(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping)

Example 5 with ApplicationMapping

use of org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping in project incubator-skywalking by apache.

the class ApplicationMappingGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Node<ApplicationMapping, ApplicationMapping> remoteNode = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.APPLICATION_MAPPING_GRAPH_ID, ApplicationMapping.class).addNode(new ApplicationMappingMinuteAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new ApplicationMappingMinuteRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.APPLICATION_MAPPING_GRAPH_ID).create(workerCreateListener));
    remoteNode.addNext(new ApplicationMappingMinutePersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationMappingHourTransformNode()).addNext(new ApplicationMappingHourPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationMappingDayTransformNode()).addNext(new ApplicationMappingDayPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationMappingMonthTransformNode()).addNext(new ApplicationMappingMonthPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
}
Also used : RemoteSenderService(org.apache.skywalking.apm.collector.remote.service.RemoteSenderService) ApplicationMapping(org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping)

Aggregations

ApplicationMapping (org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping)8 RemoteSenderService (org.apache.skywalking.apm.collector.remote.service.RemoteSenderService)1