Search in sources :

Example 6 with ApplicationComponent

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

the class AbstractApplicationComponentH2PersistenceDAO method h2DataToStreamData.

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

Example 7 with ApplicationComponent

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

the class ApplicationComponentDayTransformNode method process.

@Override
public void process(ApplicationComponent applicationComponent, Next<ApplicationComponent> next) {
    long timeBucket = TimeBucketUtils.INSTANCE.minuteToDay(applicationComponent.getTimeBucket());
    ApplicationComponent newApplicationComponent = ApplicationComponentCopy.copy(applicationComponent);
    newApplicationComponent.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + applicationComponent.getMetricId());
    newApplicationComponent.setTimeBucket(timeBucket);
    next.execute(newApplicationComponent);
}
Also used : ApplicationComponent(org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)

Example 8 with ApplicationComponent

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

the class ApplicationComponentGraph method create.

public void create() {
    RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class);
    Node<ApplicationComponent, ApplicationComponent> remoteNode = GraphManager.INSTANCE.createIfAbsent(MetricGraphIdDefine.APPLICATION_COMPONENT_GRAPH_ID, ApplicationComponent.class).addNode(new ApplicationComponentMinuteAggregationWorker.Factory(moduleManager).create(workerCreateListener)).addNext(new ApplicationComponentMinuteRemoteWorker.Factory(moduleManager, remoteSenderService, MetricGraphIdDefine.APPLICATION_COMPONENT_GRAPH_ID).create(workerCreateListener));
    remoteNode.addNext(new ApplicationComponentMinutePersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationComponentHourTransformNode()).addNext(new ApplicationComponentHourPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationComponentDayTransformNode()).addNext(new ApplicationComponentDayPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
    remoteNode.addNext(new ApplicationComponentMonthTransformNode()).addNext(new ApplicationComponentMonthPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
}
Also used : RemoteSenderService(org.apache.skywalking.apm.collector.remote.service.RemoteSenderService) ApplicationComponent(org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)

Example 9 with ApplicationComponent

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

the class ApplicationComponentHourTransformNode method process.

@Override
public void process(ApplicationComponent applicationComponent, Next<ApplicationComponent> next) {
    long timeBucket = TimeBucketUtils.INSTANCE.minuteToHour(applicationComponent.getTimeBucket());
    ApplicationComponent newApplicationComponent = ApplicationComponentCopy.copy(applicationComponent);
    newApplicationComponent.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + applicationComponent.getMetricId());
    newApplicationComponent.setTimeBucket(timeBucket);
    next.execute(newApplicationComponent);
}
Also used : ApplicationComponent(org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)

Aggregations

ApplicationComponent (org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent)9 RemoteSenderService (org.apache.skywalking.apm.collector.remote.service.RemoteSenderService)1