提交 41082be5 编写于 作者: P peng-yongsheng

Application reference metric, Application metric, Instance reference metric,...

Application reference metric,  Application metric, Instance reference metric, Instance metric, Service reference metric, Service metric pyramid aggregate by h2 storage test successful.
上级 10435c2d
...@@ -54,28 +54,28 @@ public class AnalysisAlarmModuleProvider extends ModuleProvider { ...@@ -54,28 +54,28 @@ public class AnalysisAlarmModuleProvider extends ModuleProvider {
} }
@Override public void start(Properties config) throws ServiceNotProvidedException { @Override public void start(Properties config) throws ServiceNotProvidedException {
WorkerCreateListener workerCreateListener = new WorkerCreateListener(); // WorkerCreateListener workerCreateListener = new WorkerCreateListener();
//
ServiceMetricAlarmGraph serviceMetricAlarmGraph = new ServiceMetricAlarmGraph(getManager(), workerCreateListener); // ServiceMetricAlarmGraph serviceMetricAlarmGraph = new ServiceMetricAlarmGraph(getManager(), workerCreateListener);
serviceMetricAlarmGraph.create(); // serviceMetricAlarmGraph.create();
//
InstanceMetricAlarmGraph instanceMetricAlarmGraph = new InstanceMetricAlarmGraph(getManager(), workerCreateListener); // InstanceMetricAlarmGraph instanceMetricAlarmGraph = new InstanceMetricAlarmGraph(getManager(), workerCreateListener);
instanceMetricAlarmGraph.create(); // instanceMetricAlarmGraph.create();
//
ApplicationMetricAlarmGraph applicationMetricAlarmGraph = new ApplicationMetricAlarmGraph(getManager(), workerCreateListener); // ApplicationMetricAlarmGraph applicationMetricAlarmGraph = new ApplicationMetricAlarmGraph(getManager(), workerCreateListener);
applicationMetricAlarmGraph.create(); // applicationMetricAlarmGraph.create();
//
ServiceReferenceMetricAlarmGraph serviceReferenceMetricAlarmGraph = new ServiceReferenceMetricAlarmGraph(getManager(), workerCreateListener); // ServiceReferenceMetricAlarmGraph serviceReferenceMetricAlarmGraph = new ServiceReferenceMetricAlarmGraph(getManager(), workerCreateListener);
serviceReferenceMetricAlarmGraph.create(); // serviceReferenceMetricAlarmGraph.create();
//
InstanceReferenceMetricAlarmGraph instanceReferenceMetricAlarmGraph = new InstanceReferenceMetricAlarmGraph(getManager(), workerCreateListener); // InstanceReferenceMetricAlarmGraph instanceReferenceMetricAlarmGraph = new InstanceReferenceMetricAlarmGraph(getManager(), workerCreateListener);
instanceReferenceMetricAlarmGraph.create(); // instanceReferenceMetricAlarmGraph.create();
//
ApplicationReferenceMetricAlarmGraph applicationReferenceMetricAlarmGraph = new ApplicationReferenceMetricAlarmGraph(getManager(), workerCreateListener); // ApplicationReferenceMetricAlarmGraph applicationReferenceMetricAlarmGraph = new ApplicationReferenceMetricAlarmGraph(getManager(), workerCreateListener);
applicationReferenceMetricAlarmGraph.create(); // applicationReferenceMetricAlarmGraph.create();
//
PersistenceTimer persistenceTimer = new PersistenceTimer(AnalysisAlarmModule.NAME); // PersistenceTimer persistenceTimer = new PersistenceTimer(AnalysisAlarmModule.NAME);
persistenceTimer.start(getManager(), workerCreateListener.getPersistenceWorkers()); // persistenceTimer.start(getManager(), workerCreateListener.getPersistenceWorkers());
} }
@Override public void notifyAfterCompleted() throws ServiceNotProvidedException { @Override public void notifyAfterCompleted() throws ServiceNotProvidedException {
......
...@@ -88,7 +88,7 @@ public class AnalysisMetricModuleProvider extends ModuleProvider { ...@@ -88,7 +88,7 @@ public class AnalysisMetricModuleProvider extends ModuleProvider {
private void segmentParserListenerRegister() { private void segmentParserListenerRegister() {
ISegmentParserListenerRegister segmentParserListenerRegister = getManager().find(AnalysisSegmentParserModule.NAME).getService(ISegmentParserListenerRegister.class); ISegmentParserListenerRegister segmentParserListenerRegister = getManager().find(AnalysisSegmentParserModule.NAME).getService(ISegmentParserListenerRegister.class);
// segmentParserListenerRegister.register(new ServiceReferenceMetricSpanListener.Factory()); segmentParserListenerRegister.register(new ServiceReferenceMetricSpanListener.Factory());
segmentParserListenerRegister.register(new ApplicationComponentSpanListener.Factory()); segmentParserListenerRegister.register(new ApplicationComponentSpanListener.Factory());
segmentParserListenerRegister.register(new ApplicationMappingSpanListener.Factory()); segmentParserListenerRegister.register(new ApplicationMappingSpanListener.Factory());
segmentParserListenerRegister.register(new InstanceMappingSpanListener.Factory()); segmentParserListenerRegister.register(new InstanceMappingSpanListener.Factory());
......
...@@ -29,6 +29,7 @@ import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO; ...@@ -29,6 +29,7 @@ import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IGCMetricUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTraceUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IGlobalTraceUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IInstanceHeartBeatPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.IInstanceMetricUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IInstanceMetricUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO;
...@@ -42,10 +43,18 @@ import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponent ...@@ -42,10 +43,18 @@ import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponent
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentHourPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentHourPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMonthPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMonthPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingDayPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingDayPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingHourPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingHourPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMinutePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMinutePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMonthPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMonthPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO; import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO;
import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO; import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO; import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO;
...@@ -60,10 +69,18 @@ import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersist ...@@ -60,10 +69,18 @@ import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersist
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingDayPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingDayPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingHourPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingHourPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMinutePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMinutePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMonthPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMonthPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryDayMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryHourMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryMinuteMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryMinuteMetricPersistenceDAO;
...@@ -78,6 +95,14 @@ import org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegi ...@@ -78,6 +95,14 @@ import org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegi
import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO; import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO;
import org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO; import org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO;
import org.apache.skywalking.apm.collector.storage.dao.register.IServiceNameRegisterDAO; import org.apache.skywalking.apm.collector.storage.dao.register.IServiceNameRegisterDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO;
/** /**
* @author peng-yongsheng * @author peng-yongsheng
...@@ -160,38 +185,37 @@ public class StorageModule extends Module { ...@@ -160,38 +185,37 @@ public class StorageModule extends Module {
classes.add(IGlobalTracePersistenceDAO.class); classes.add(IGlobalTracePersistenceDAO.class);
classes.add(ISegmentCostPersistenceDAO.class); classes.add(ISegmentCostPersistenceDAO.class);
classes.add(ISegmentPersistenceDAO.class); classes.add(ISegmentPersistenceDAO.class);
classes.add(IInstanceHeartBeatPersistenceDAO.class);
// classes.add(IApplicationMinuteMetricPersistenceDAO.class);
// classes.add(IApplicationHourMetricPersistenceDAO.class); classes.add(IApplicationMinuteMetricPersistenceDAO.class);
// classes.add(IApplicationDayMetricPersistenceDAO.class); classes.add(IApplicationHourMetricPersistenceDAO.class);
// classes.add(IApplicationMonthMetricPersistenceDAO.class); classes.add(IApplicationDayMetricPersistenceDAO.class);
// classes.add(IApplicationMonthMetricPersistenceDAO.class);
// classes.add(IApplicationReferenceMinuteMetricPersistenceDAO.class);
// classes.add(IApplicationReferenceHourMetricPersistenceDAO.class); classes.add(IApplicationReferenceMinuteMetricPersistenceDAO.class);
// classes.add(IApplicationReferenceDayMetricPersistenceDAO.class); classes.add(IApplicationReferenceHourMetricPersistenceDAO.class);
// classes.add(IApplicationReferenceMonthMetricPersistenceDAO.class); classes.add(IApplicationReferenceDayMetricPersistenceDAO.class);
classes.add(IApplicationReferenceMonthMetricPersistenceDAO.class);
// classes.add(IServiceMinuteMetricPersistenceDAO.class);
// classes.add(IServiceHourMetricPersistenceDAO.class); classes.add(IServiceMinuteMetricPersistenceDAO.class);
// classes.add(IServiceDayMetricPersistenceDAO.class); classes.add(IServiceHourMetricPersistenceDAO.class);
// classes.add(IServiceMonthMetricPersistenceDAO.class); classes.add(IServiceDayMetricPersistenceDAO.class);
// classes.add(IServiceMonthMetricPersistenceDAO.class);
// classes.add(IServiceReferenceMinuteMetricPersistenceDAO.class);
// classes.add(IServiceReferenceHourMetricPersistenceDAO.class); classes.add(IServiceReferenceMinuteMetricPersistenceDAO.class);
// classes.add(IServiceReferenceDayMetricPersistenceDAO.class); classes.add(IServiceReferenceHourMetricPersistenceDAO.class);
// classes.add(IServiceReferenceMonthMetricPersistenceDAO.class); classes.add(IServiceReferenceDayMetricPersistenceDAO.class);
// classes.add(IServiceReferenceMonthMetricPersistenceDAO.class);
// classes.add(IInstanceMinuteMetricPersistenceDAO.class);
// classes.add(IInstanceHourMetricPersistenceDAO.class); classes.add(IInstanceMinuteMetricPersistenceDAO.class);
// classes.add(IInstanceDayMetricPersistenceDAO.class); classes.add(IInstanceHourMetricPersistenceDAO.class);
// classes.add(IInstanceMonthMetricPersistenceDAO.class); classes.add(IInstanceDayMetricPersistenceDAO.class);
// classes.add(IInstanceMonthMetricPersistenceDAO.class);
// classes.add(IInstanceReferenceMinuteMetricPersistenceDAO.class);
// classes.add(IInstanceReferenceHourMetricPersistenceDAO.class); classes.add(IInstanceReferenceMinuteMetricPersistenceDAO.class);
// classes.add(IInstanceReferenceDayMetricPersistenceDAO.class); classes.add(IInstanceReferenceHourMetricPersistenceDAO.class);
// classes.add(IInstanceReferenceMonthMetricPersistenceDAO.class); classes.add(IInstanceReferenceDayMetricPersistenceDAO.class);
// classes.add(IInstanceReferenceMonthMetricPersistenceDAO.class);
// classes.add(IInstanceHeartBeatPersistenceDAO.class);
} }
private void addUiDAO(List<Class> classes) { private void addUiDAO(List<Class> classes) {
......
...@@ -34,7 +34,9 @@ public abstract class AbstractInstanceReferenceMetricEsTableDefine extends Elast ...@@ -34,7 +34,9 @@ public abstract class AbstractInstanceReferenceMetricEsTableDefine extends Elast
@Override public final void initialize() { @Override public final void initialize() {
addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_ID, ElasticSearchColumnDefine.Type.Keyword.name())); addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_ID, ElasticSearchColumnDefine.Type.Keyword.name()));
addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_METRIC_ID, ElasticSearchColumnDefine.Type.Keyword.name())); addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_METRIC_ID, ElasticSearchColumnDefine.Type.Keyword.name()));
addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_SOURCE_VALUE, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(InstanceReferenceMetricTable.COLUMN_SOURCE_VALUE, ElasticSearchColumnDefine.Type.Integer.name()));
......
...@@ -34,6 +34,8 @@ public abstract class AbstractServiceMetricEsTableDefine extends ElasticSearchTa ...@@ -34,6 +34,8 @@ public abstract class AbstractServiceMetricEsTableDefine extends ElasticSearchTa
@Override public final void initialize() { @Override public final void initialize() {
addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_ID, ElasticSearchColumnDefine.Type.Keyword.name())); addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_ID, ElasticSearchColumnDefine.Type.Keyword.name()));
addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_METRIC_ID, ElasticSearchColumnDefine.Type.Keyword.name())); addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_METRIC_ID, ElasticSearchColumnDefine.Type.Keyword.name()));
addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_APPLICATION_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_SERVICE_ID, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_SERVICE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_SOURCE_VALUE, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(ServiceMetricTable.COLUMN_SOURCE_VALUE, ElasticSearchColumnDefine.Type.Integer.name()));
......
...@@ -34,7 +34,11 @@ public abstract class AbstractServiceReferenceMetricEsTableDefine extends Elasti ...@@ -34,7 +34,11 @@ public abstract class AbstractServiceReferenceMetricEsTableDefine extends Elasti
@Override public final void initialize() { @Override public final void initialize() {
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_METRIC_ID, ElasticSearchColumnDefine.Type.Keyword.name())); addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_METRIC_ID, ElasticSearchColumnDefine.Type.Keyword.name()));
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID, ElasticSearchColumnDefine.Type.Integer.name()));
addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE, ElasticSearchColumnDefine.Type.Integer.name()));
......
...@@ -34,6 +34,7 @@ import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO; ...@@ -34,6 +34,7 @@ import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IGCMetricUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTraceUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IGlobalTraceUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IInstanceHeartBeatPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.IInstanceMetricUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IInstanceMetricUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO;
import org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO; import org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO;
...@@ -47,10 +48,18 @@ import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponent ...@@ -47,10 +48,18 @@ import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponent
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentHourPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentHourPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMonthPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMonthPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingDayPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingDayPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingHourPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingHourPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMinutePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMinutePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMonthPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMonthPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO; import org.apache.skywalking.apm.collector.storage.dao.cache.IApplicationCacheDAO;
import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO; import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO; import org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO;
...@@ -65,10 +74,18 @@ import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersist ...@@ -65,10 +74,18 @@ import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersist
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingDayPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingDayPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingHourPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingHourPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMinutePersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMinutePersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMonthPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.impp.IInstanceMappingMonthPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryDayMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryHourMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryMinuteMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemoryMinuteMetricPersistenceDAO;
...@@ -83,6 +100,14 @@ import org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegi ...@@ -83,6 +100,14 @@ import org.apache.skywalking.apm.collector.storage.dao.register.IApplicationRegi
import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO; import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegisterDAO;
import org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO; import org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO;
import org.apache.skywalking.apm.collector.storage.dao.register.IServiceNameRegisterDAO; import org.apache.skywalking.apm.collector.storage.dao.register.IServiceNameRegisterDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.BatchH2DAO; import org.apache.skywalking.apm.collector.storage.h2.base.dao.BatchH2DAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2StorageInstaller; import org.apache.skywalking.apm.collector.storage.h2.base.define.H2StorageInstaller;
import org.apache.skywalking.apm.collector.storage.h2.dao.ApplicationComponentH2UIDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.ApplicationComponentH2UIDAO;
...@@ -93,6 +118,7 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.GCMetricH2UIDAO; ...@@ -93,6 +118,7 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.GCMetricH2UIDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.GlobalTraceH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.GlobalTraceH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.GlobalTraceH2UIDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.GlobalTraceH2UIDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.InstanceH2UIDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.InstanceH2UIDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.InstanceHeartBeatH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.InstanceMetricH2UIDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.InstanceMetricH2UIDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.MemoryMetricH2UIDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.MemoryMetricH2UIDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.MemoryPoolMetricH2UIDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.MemoryPoolMetricH2UIDAO;
...@@ -105,10 +131,18 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationCompone ...@@ -105,10 +131,18 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationCompone
import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationComponentHourH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationComponentHourH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationComponentMinuteH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationComponentMinuteH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationComponentMonthH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.acp.ApplicationComponentMonthH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.amp.ApplicationDayMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.amp.ApplicationHourMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.amp.ApplicationMinuteMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.amp.ApplicationMonthMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingDayH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingDayH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingHourH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingHourH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingMinuteH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingMinuteH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingMonthH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.ampp.ApplicationMappingMonthH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.armp.ApplicationReferenceDayMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.armp.ApplicationReferenceHourMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.armp.ApplicationReferenceMinuteMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.armp.ApplicationReferenceMonthMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.cache.ApplicationH2CacheDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.cache.ApplicationH2CacheDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.cache.InstanceH2CacheDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.cache.InstanceH2CacheDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.cache.NetworkAddressH2CacheDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.cache.NetworkAddressH2CacheDAO;
...@@ -123,10 +157,18 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCHourMetricH2Per ...@@ -123,10 +157,18 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCHourMetricH2Per
import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCMinuteMetricH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCMinuteMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCMonthMetricH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCMonthMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCSecondMetricH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.gcmp.GCSecondMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.imp.InstanceDayMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.imp.InstanceHourMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.imp.InstanceMinuteMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.imp.InstanceMonthMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingDayH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingDayH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingHourH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingHourH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingMinuteH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingMinuteH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingMonthH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.impp.InstanceMappingMonthH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.irmp.InstanceReferenceDayMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.irmp.InstanceReferenceHourMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.irmp.InstanceReferenceMinuteMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.irmp.InstanceReferenceMonthMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.memorymp.MemoryDayMetricH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.memorymp.MemoryDayMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.memorymp.MemoryHourMetricH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.memorymp.MemoryHourMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.memorymp.MemoryMinuteMetricH2PersistenceDAO; import org.apache.skywalking.apm.collector.storage.h2.dao.memorymp.MemoryMinuteMetricH2PersistenceDAO;
...@@ -141,6 +183,14 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.register.ApplicationRe ...@@ -141,6 +183,14 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.register.ApplicationRe
import org.apache.skywalking.apm.collector.storage.h2.dao.register.InstanceRegisterH2DAO; import org.apache.skywalking.apm.collector.storage.h2.dao.register.InstanceRegisterH2DAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.register.NetworkAddressRegisterH2DAO; import org.apache.skywalking.apm.collector.storage.h2.dao.register.NetworkAddressRegisterH2DAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.register.ServiceNameRegisterH2DAO; import org.apache.skywalking.apm.collector.storage.h2.dao.register.ServiceNameRegisterH2DAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.smp.ServiceDayMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.smp.ServiceHourMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.smp.ServiceMinuteMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.smp.ServiceMonthMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.srmp.ServiceReferenceDayMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.srmp.ServiceReferenceHourMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.srmp.ServiceReferenceMinuteMetricH2PersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.dao.srmp.ServiceReferenceMonthMetricH2PersistenceDAO;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -240,6 +290,7 @@ public class StorageModuleH2Provider extends ModuleProvider { ...@@ -240,6 +290,7 @@ public class StorageModuleH2Provider extends ModuleProvider {
this.registerServiceImplementation(IGlobalTracePersistenceDAO.class, new GlobalTraceH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IGlobalTracePersistenceDAO.class, new GlobalTraceH2PersistenceDAO(h2Client));
this.registerServiceImplementation(ISegmentCostPersistenceDAO.class, new SegmentCostH2PersistenceDAO(h2Client)); this.registerServiceImplementation(ISegmentCostPersistenceDAO.class, new SegmentCostH2PersistenceDAO(h2Client));
this.registerServiceImplementation(ISegmentPersistenceDAO.class, new SegmentH2PersistenceDAO(h2Client)); this.registerServiceImplementation(ISegmentPersistenceDAO.class, new SegmentH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceHeartBeatPersistenceDAO.class, new InstanceHeartBeatH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IApplicationComponentMinutePersistenceDAO.class, new ApplicationComponentMinuteH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationComponentMinutePersistenceDAO.class, new ApplicationComponentMinuteH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IApplicationComponentHourPersistenceDAO.class, new ApplicationComponentHourH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationComponentHourPersistenceDAO.class, new ApplicationComponentHourH2PersistenceDAO(h2Client));
...@@ -256,14 +307,35 @@ public class StorageModuleH2Provider extends ModuleProvider { ...@@ -256,14 +307,35 @@ public class StorageModuleH2Provider extends ModuleProvider {
this.registerServiceImplementation(IInstanceMappingDayPersistenceDAO.class, new InstanceMappingDayH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IInstanceMappingDayPersistenceDAO.class, new InstanceMappingDayH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceMappingMonthPersistenceDAO.class, new InstanceMappingMonthH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IInstanceMappingMonthPersistenceDAO.class, new InstanceMappingMonthH2PersistenceDAO(h2Client));
// this.registerServiceImplementation(IApplicationMinuteMetricPersistenceDAO.class, new ApplicationMinuteMetricH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationMinuteMetricPersistenceDAO.class, new ApplicationMinuteMetricH2PersistenceDAO(h2Client));
// this.registerServiceImplementation(IApplicationReferenceMinuteMetricPersistenceDAO.class, new ApplicationReferenceMinuteMetricH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationHourMetricPersistenceDAO.class, new ApplicationHourMetricH2PersistenceDAO(h2Client));
// this.registerServiceImplementation(IServiceMinuteMetricPersistenceDAO.class, new ServiceMinuteMetricH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationDayMetricPersistenceDAO.class, new ApplicationDayMetricH2PersistenceDAO(h2Client));
// this.registerServiceImplementation(IServiceReferenceMinuteMetricPersistenceDAO.class, new ServiceReferenceMetricH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationMonthMetricPersistenceDAO.class, new ApplicationMonthMetricH2PersistenceDAO(h2Client));
//
// this.registerServiceImplementation(IInstanceMinuteMetricPersistenceDAO.class, new InstanceMinuteMetricH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationReferenceMinuteMetricPersistenceDAO.class, new ApplicationReferenceMinuteMetricH2PersistenceDAO(h2Client));
// this.registerServiceImplementation(IInstanceReferenceMinuteMetricPersistenceDAO.class, new InstanceReferenceMetricH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationReferenceHourMetricPersistenceDAO.class, new ApplicationReferenceHourMetricH2PersistenceDAO(h2Client));
// this.registerServiceImplementation(IInstanceHeartBeatPersistenceDAO.class, new InstanceHeartBeatH2PersistenceDAO(h2Client)); this.registerServiceImplementation(IApplicationReferenceDayMetricPersistenceDAO.class, new ApplicationReferenceDayMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IApplicationReferenceMonthMetricPersistenceDAO.class, new ApplicationReferenceMonthMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceMinuteMetricPersistenceDAO.class, new InstanceMinuteMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceHourMetricPersistenceDAO.class, new InstanceHourMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceDayMetricPersistenceDAO.class, new InstanceDayMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceMonthMetricPersistenceDAO.class, new InstanceMonthMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceReferenceMinuteMetricPersistenceDAO.class, new InstanceReferenceMinuteMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceReferenceHourMetricPersistenceDAO.class, new InstanceReferenceHourMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceReferenceDayMetricPersistenceDAO.class, new InstanceReferenceDayMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IInstanceReferenceMonthMetricPersistenceDAO.class, new InstanceReferenceMonthMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceMinuteMetricPersistenceDAO.class, new ServiceMinuteMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceHourMetricPersistenceDAO.class, new ServiceHourMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceDayMetricPersistenceDAO.class, new ServiceDayMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceMonthMetricPersistenceDAO.class, new ServiceMonthMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceReferenceMinuteMetricPersistenceDAO.class, new ServiceReferenceMinuteMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceReferenceHourMetricPersistenceDAO.class, new ServiceReferenceHourMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceReferenceDayMetricPersistenceDAO.class, new ServiceReferenceDayMetricH2PersistenceDAO(h2Client));
this.registerServiceImplementation(IServiceReferenceMonthMetricPersistenceDAO.class, new ServiceReferenceMonthMetricH2PersistenceDAO(h2Client));
} }
private void registerUiDAO() throws ServiceNotProvidedException { private void registerUiDAO() throws ServiceNotProvidedException {
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author peng-yongsheng, clevertension
*/
public class InstanceReferenceMetricH2PersistenceDAO extends H2DAO implements IInstanceReferenceMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceReferenceMetric> {
private final Logger logger = LoggerFactory.getLogger(InstanceReferenceMetricH2PersistenceDAO.class);
private static final String GET_SQL = "select * from {0} where {1} = ?";
public InstanceReferenceMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override public InstanceReferenceMetric get(String id) {
H2Client client = getClient();
String sql = SqlBuilder.buildSql(GET_SQL, InstanceReferenceMetricTable.TABLE, InstanceReferenceMetricTable.COLUMN_ID);
Object[] params = new Object[] {id};
try (ResultSet rs = client.executeQuery(sql, params)) {
if (rs.next()) {
InstanceReferenceMetric instanceReferenceMetric = new InstanceReferenceMetric();
instanceReferenceMetric.setId(id);
instanceReferenceMetric.setFrontInstanceId(rs.getInt(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID));
instanceReferenceMetric.setBehindInstanceId(rs.getInt(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID));
instanceReferenceMetric.setTransactionCalls(rs.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_CALLS));
instanceReferenceMetric.setTransactionErrorCalls(rs.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
instanceReferenceMetric.setTransactionDurationSum(rs.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
instanceReferenceMetric.setTransactionErrorDurationSum(rs.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
instanceReferenceMetric.setBusinessTransactionCalls(rs.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
instanceReferenceMetric.setBusinessTransactionErrorCalls(rs.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
instanceReferenceMetric.setBusinessTransactionDurationSum(rs.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
instanceReferenceMetric.setBusinessTransactionErrorDurationSum(rs.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
instanceReferenceMetric.setMqTransactionCalls(rs.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
instanceReferenceMetric.setMqTransactionErrorCalls(rs.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
instanceReferenceMetric.setMqTransactionDurationSum(rs.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
instanceReferenceMetric.setMqTransactionErrorDurationSum(rs.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
instanceReferenceMetric.setTimeBucket(rs.getLong(InstanceReferenceMetricTable.COLUMN_TIME_BUCKET));
return instanceReferenceMetric;
}
} catch (SQLException | H2ClientException e) {
logger.error(e.getMessage(), e);
}
return null;
}
@Override public H2SqlEntity prepareBatchInsert(InstanceReferenceMetric data) {
Map<String, Object> source = new HashMap<>();
H2SqlEntity entity = new H2SqlEntity();
source.put(InstanceReferenceMetricTable.COLUMN_ID, data.getId());
source.put(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, data.getFrontInstanceId());
source.put(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, data.getBehindInstanceId());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, data.getTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, data.getTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, data.getTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, data.getTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, data.getBusinessTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, data.getBusinessTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, data.getBusinessTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, data.getBusinessTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, data.getMqTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, data.getMqTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, data.getMqTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, data.getMqTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_TIME_BUCKET, data.getTimeBucket());
String sql = SqlBuilder.buildBatchInsertSql(InstanceReferenceMetricTable.TABLE, source.keySet());
entity.setSql(sql);
entity.setParams(source.values().toArray(new Object[0]));
return entity;
}
@Override public H2SqlEntity prepareBatchUpdate(InstanceReferenceMetric data) {
Map<String, Object> source = new HashMap<>();
H2SqlEntity entity = new H2SqlEntity();
source.put(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, data.getFrontInstanceId());
source.put(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, data.getBehindInstanceId());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, data.getTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, data.getTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, data.getTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, data.getTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, data.getBusinessTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, data.getBusinessTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, data.getBusinessTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, data.getBusinessTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, data.getMqTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, data.getMqTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, data.getMqTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, data.getMqTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_TIME_BUCKET, data.getTimeBucket());
String sql = SqlBuilder.buildBatchUpdateSql(InstanceReferenceMetricTable.TABLE, source.keySet(), InstanceReferenceMetricTable.COLUMN_ID);
entity.setSql(sql);
List<Object> values = new ArrayList<>(source.values());
values.add(data.getId());
entity.setParams(values.toArray(new Object[0]));
return entity;
}
@Override public void deleteHistory(Long startTimestamp, Long endTimestamp) {
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.client.h2.H2ClientException;
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* @author peng-yongsheng, clevertension
*/
public class ServiceReferenceMetricH2PersistenceDAO extends H2DAO implements IServiceReferenceMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceReferenceMetric> {
private final Logger logger = LoggerFactory.getLogger(ServiceReferenceMetricH2PersistenceDAO.class);
private static final String GET_SQL = "select * from {0} where {1} = ?";
public ServiceReferenceMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override
public ServiceReferenceMetric get(String id) {
H2Client client = getClient();
String sql = SqlBuilder.buildSql(GET_SQL, ServiceReferenceMetricTable.TABLE, ServiceReferenceMetricTable.COLUMN_ID);
Object[] params = new Object[] {id};
try (ResultSet rs = client.executeQuery(sql, params)) {
if (rs.next()) {
ServiceReferenceMetric serviceReferenceMetric = new ServiceReferenceMetric();
serviceReferenceMetric.setId(id);
serviceReferenceMetric.setFrontServiceId(rs.getInt(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID));
serviceReferenceMetric.setBehindServiceId(rs.getInt(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID));
serviceReferenceMetric.setSourceValue(rs.getInt(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE));
serviceReferenceMetric.setTransactionCalls(rs.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_CALLS));
serviceReferenceMetric.setTransactionErrorCalls(rs.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
serviceReferenceMetric.setTransactionDurationSum(rs.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
serviceReferenceMetric.setTransactionErrorDurationSum(rs.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
serviceReferenceMetric.setBusinessTransactionCalls(rs.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
serviceReferenceMetric.setBusinessTransactionErrorCalls(rs.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
serviceReferenceMetric.setBusinessTransactionDurationSum(rs.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
serviceReferenceMetric.setBusinessTransactionErrorDurationSum(rs.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
serviceReferenceMetric.setMqTransactionCalls(rs.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
serviceReferenceMetric.setMqTransactionErrorCalls(rs.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
serviceReferenceMetric.setMqTransactionDurationSum(rs.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
serviceReferenceMetric.setMqTransactionErrorDurationSum(rs.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
serviceReferenceMetric.setTimeBucket(rs.getLong(ServiceReferenceMetricTable.COLUMN_TIME_BUCKET));
return serviceReferenceMetric;
}
} catch (SQLException | H2ClientException e) {
logger.error(e.getMessage(), e);
}
return null;
}
@Override
public H2SqlEntity prepareBatchInsert(ServiceReferenceMetric data) {
H2SqlEntity entity = new H2SqlEntity();
Map<String, Object> source = new HashMap<>();
source.put(ServiceReferenceMetricTable.COLUMN_ID, data.getId());
source.put(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID, data.getFrontServiceId());
source.put(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID, data.getBehindServiceId());
source.put(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE, data.getSourceValue());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, data.getTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, data.getTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, data.getTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, data.getTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, data.getBusinessTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, data.getBusinessTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, data.getBusinessTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, data.getBusinessTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, data.getMqTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, data.getMqTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, data.getMqTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, data.getMqTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_TIME_BUCKET, data.getTimeBucket());
String sql = SqlBuilder.buildBatchInsertSql(ServiceReferenceMetricTable.TABLE, source.keySet());
entity.setSql(sql);
entity.setParams(source.values().toArray(new Object[0]));
return entity;
}
@Override
public H2SqlEntity prepareBatchUpdate(ServiceReferenceMetric data) {
H2SqlEntity entity = new H2SqlEntity();
Map<String, Object> source = new HashMap<>();
source.put(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID, data.getFrontServiceId());
source.put(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID, data.getBehindServiceId());
source.put(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE, data.getSourceValue());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, data.getTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, data.getTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, data.getTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, data.getTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, data.getBusinessTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, data.getBusinessTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, data.getBusinessTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, data.getBusinessTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, data.getMqTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, data.getMqTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, data.getMqTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, data.getMqTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_TIME_BUCKET, data.getTimeBucket());
String sql = SqlBuilder.buildBatchUpdateSql(ServiceReferenceMetricTable.TABLE, source.keySet(), ServiceReferenceMetricTable.COLUMN_ID);
entity.setSql(sql);
List<Object> values = new ArrayList<>(source.values());
values.add(data.getId());
entity.setParams(values.toArray(new Object[0]));
return entity;
}
@Override public void deleteHistory(Long startTimestamp, Long endTimestamp) {
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.amp;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.AbstractPersistenceH2DAO;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractApplicationMetricH2PersistenceDAO extends AbstractPersistenceH2DAO<ApplicationMetric> {
public AbstractApplicationMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected final ApplicationMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
ApplicationMetric applicationMetric = new ApplicationMetric();
applicationMetric.setId(resultSet.getString(ApplicationMetricTable.COLUMN_ID));
applicationMetric.setMetricId(resultSet.getString(ApplicationMetricTable.COLUMN_METRIC_ID));
applicationMetric.setApplicationId(resultSet.getInt(ApplicationMetricTable.COLUMN_APPLICATION_ID));
applicationMetric.setSourceValue(resultSet.getInt(ApplicationMetricTable.COLUMN_SOURCE_VALUE));
applicationMetric.setTransactionCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_CALLS));
applicationMetric.setTransactionErrorCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
applicationMetric.setTransactionDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
applicationMetric.setTransactionErrorDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
applicationMetric.setBusinessTransactionCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
applicationMetric.setBusinessTransactionErrorCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
applicationMetric.setBusinessTransactionDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
applicationMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
applicationMetric.setMqTransactionCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
applicationMetric.setMqTransactionErrorCalls(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
applicationMetric.setMqTransactionDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
applicationMetric.setMqTransactionErrorDurationSum(resultSet.getLong(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
applicationMetric.setSatisfiedCount(resultSet.getLong(ApplicationMetricTable.COLUMN_SATISFIED_COUNT));
applicationMetric.setToleratingCount(resultSet.getLong(ApplicationMetricTable.COLUMN_TOLERATING_COUNT));
applicationMetric.setFrustratedCount(resultSet.getLong(ApplicationMetricTable.COLUMN_FRUSTRATED_COUNT));
applicationMetric.setTimeBucket(resultSet.getLong(ApplicationMetricTable.COLUMN_TIME_BUCKET));
return applicationMetric;
}
@Override protected final Map<String, Object> streamDataToH2Data(ApplicationMetric streamData) {
Map<String, Object> source = new HashMap<>();
source.put(ApplicationMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
source.put(ApplicationMetricTable.COLUMN_APPLICATION_ID, streamData.getApplicationId());
source.put(ApplicationMetricTable.COLUMN_SOURCE_VALUE, streamData.getSourceValue());
source.put(ApplicationMetricTable.COLUMN_TRANSACTION_CALLS, streamData.getTransactionCalls());
source.put(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, streamData.getTransactionErrorCalls());
source.put(ApplicationMetricTable.COLUMN_TRANSACTION_DURATION_SUM, streamData.getTransactionDurationSum());
source.put(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, streamData.getTransactionErrorDurationSum());
source.put(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, streamData.getBusinessTransactionCalls());
source.put(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, streamData.getBusinessTransactionErrorCalls());
source.put(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, streamData.getBusinessTransactionDurationSum());
source.put(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, streamData.getBusinessTransactionErrorDurationSum());
source.put(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_CALLS, streamData.getMqTransactionCalls());
source.put(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, streamData.getMqTransactionErrorCalls());
source.put(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, streamData.getMqTransactionDurationSum());
source.put(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, streamData.getMqTransactionErrorDurationSum());
source.put(ApplicationMetricTable.COLUMN_SATISFIED_COUNT, streamData.getSatisfiedCount());
source.put(ApplicationMetricTable.COLUMN_TOLERATING_COUNT, streamData.getToleratingCount());
source.put(ApplicationMetricTable.COLUMN_FRUSTRATED_COUNT, streamData.getFrustratedCount());
source.put(ApplicationMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
return source;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.amp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng, clevertension
*/
public class ApplicationDayMetricH2PersistenceDAO extends AbstractApplicationMetricH2PersistenceDAO implements IApplicationDayMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationMetric> {
public ApplicationDayMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.amp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng, clevertension
*/
public class ApplicationHourMetricH2PersistenceDAO extends AbstractApplicationMetricH2PersistenceDAO implements IApplicationHourMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationMetric> {
public ApplicationHourMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.amp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng, clevertension
*/
public class ApplicationMinuteMetricH2PersistenceDAO extends AbstractApplicationMetricH2PersistenceDAO implements IApplicationMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationMetric> {
public ApplicationMinuteMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.amp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng, clevertension
*/
public class ApplicationMonthMetricH2PersistenceDAO extends AbstractApplicationMetricH2PersistenceDAO implements IApplicationMonthMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationMetric> {
public ApplicationMonthMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.armp;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.AbstractPersistenceH2DAO;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractApplicationReferenceMetricH2PersistenceDAO extends AbstractPersistenceH2DAO<ApplicationReferenceMetric> {
public AbstractApplicationReferenceMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected final ApplicationReferenceMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
ApplicationReferenceMetric applicationReferenceMetric = new ApplicationReferenceMetric();
applicationReferenceMetric.setId(resultSet.getString(ApplicationReferenceMetricTable.COLUMN_ID));
applicationReferenceMetric.setMetricId(resultSet.getString(ApplicationReferenceMetricTable.COLUMN_METRIC_ID));
applicationReferenceMetric.setFrontApplicationId(resultSet.getInt(ApplicationReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID));
applicationReferenceMetric.setBehindApplicationId(resultSet.getInt(ApplicationReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID));
applicationReferenceMetric.setSourceValue(resultSet.getInt(ApplicationReferenceMetricTable.COLUMN_SOURCE_VALUE));
applicationReferenceMetric.setTransactionCalls(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_CALLS));
applicationReferenceMetric.setTransactionErrorCalls(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
applicationReferenceMetric.setTransactionDurationSum(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
applicationReferenceMetric.setTransactionErrorDurationSum(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
applicationReferenceMetric.setBusinessTransactionCalls(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
applicationReferenceMetric.setBusinessTransactionErrorCalls(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
applicationReferenceMetric.setBusinessTransactionDurationSum(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
applicationReferenceMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
applicationReferenceMetric.setMqTransactionCalls(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
applicationReferenceMetric.setMqTransactionErrorCalls(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
applicationReferenceMetric.setMqTransactionDurationSum(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
applicationReferenceMetric.setMqTransactionErrorDurationSum(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
applicationReferenceMetric.setSatisfiedCount(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_SATISFIED_COUNT));
applicationReferenceMetric.setToleratingCount(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_TOLERATING_COUNT));
applicationReferenceMetric.setFrustratedCount(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_FRUSTRATED_COUNT));
applicationReferenceMetric.setTimeBucket(resultSet.getLong(ApplicationReferenceMetricTable.COLUMN_TIME_BUCKET));
return applicationReferenceMetric;
}
@Override protected final Map<String, Object> streamDataToH2Data(ApplicationReferenceMetric streamData) {
Map<String, Object> source = new HashMap<>();
source.put(ApplicationReferenceMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
source.put(ApplicationReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, streamData.getFrontApplicationId());
source.put(ApplicationReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, streamData.getBehindApplicationId());
source.put(ApplicationReferenceMetricTable.COLUMN_SOURCE_VALUE, streamData.getSourceValue());
source.put(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_CALLS, streamData.getTransactionCalls());
source.put(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, streamData.getTransactionErrorCalls());
source.put(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, streamData.getTransactionDurationSum());
source.put(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, streamData.getTransactionErrorDurationSum());
source.put(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, streamData.getBusinessTransactionCalls());
source.put(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, streamData.getBusinessTransactionErrorCalls());
source.put(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, streamData.getBusinessTransactionDurationSum());
source.put(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, streamData.getBusinessTransactionErrorDurationSum());
source.put(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, streamData.getMqTransactionCalls());
source.put(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, streamData.getMqTransactionErrorCalls());
source.put(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, streamData.getMqTransactionDurationSum());
source.put(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, streamData.getMqTransactionErrorDurationSum());
source.put(ApplicationReferenceMetricTable.COLUMN_SATISFIED_COUNT, streamData.getSatisfiedCount());
source.put(ApplicationReferenceMetricTable.COLUMN_TOLERATING_COUNT, streamData.getToleratingCount());
source.put(ApplicationReferenceMetricTable.COLUMN_FRUSTRATED_COUNT, streamData.getFrustratedCount());
source.put(ApplicationReferenceMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
return source;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.armp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceDayMetricH2PersistenceDAO extends AbstractApplicationReferenceMetricH2PersistenceDAO implements IApplicationReferenceDayMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationReferenceMetric> {
public ApplicationReferenceDayMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.armp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceHourMetricH2PersistenceDAO extends AbstractApplicationReferenceMetricH2PersistenceDAO implements IApplicationReferenceHourMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationReferenceMetric> {
public ApplicationReferenceHourMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.armp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceMinuteMetricH2PersistenceDAO extends AbstractApplicationReferenceMetricH2PersistenceDAO implements IApplicationReferenceMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationReferenceMetric> {
public ApplicationReferenceMinuteMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.armp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceMonthMetricH2PersistenceDAO extends AbstractApplicationReferenceMetricH2PersistenceDAO implements IApplicationReferenceMonthMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ApplicationReferenceMetric> {
public ApplicationReferenceMonthMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.imp;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.AbstractPersistenceH2DAO;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractInstanceMetricH2PersistenceDAO extends AbstractPersistenceH2DAO<InstanceMetric> {
public AbstractInstanceMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected final InstanceMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
InstanceMetric instanceMetric = new InstanceMetric();
instanceMetric.setId(resultSet.getString(InstanceMetricTable.COLUMN_ID));
instanceMetric.setMetricId(resultSet.getString(InstanceMetricTable.COLUMN_METRIC_ID));
instanceMetric.setApplicationId(resultSet.getInt(InstanceMetricTable.COLUMN_APPLICATION_ID));
instanceMetric.setInstanceId(resultSet.getInt(InstanceMetricTable.COLUMN_INSTANCE_ID));
instanceMetric.setSourceValue(resultSet.getInt(InstanceMetricTable.COLUMN_SOURCE_VALUE));
instanceMetric.setTransactionCalls(resultSet.getLong(InstanceMetricTable.COLUMN_TRANSACTION_CALLS));
instanceMetric.setTransactionErrorCalls(resultSet.getLong(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
instanceMetric.setTransactionDurationSum(resultSet.getLong(InstanceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
instanceMetric.setTransactionErrorDurationSum(resultSet.getLong(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
instanceMetric.setBusinessTransactionCalls(resultSet.getLong(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
instanceMetric.setBusinessTransactionErrorCalls(resultSet.getLong(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
instanceMetric.setBusinessTransactionDurationSum(resultSet.getLong(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
instanceMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
instanceMetric.setMqTransactionCalls(resultSet.getLong(InstanceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
instanceMetric.setMqTransactionErrorCalls(resultSet.getLong(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
instanceMetric.setMqTransactionDurationSum(resultSet.getLong(InstanceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
instanceMetric.setMqTransactionErrorDurationSum(resultSet.getLong(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
instanceMetric.setTimeBucket(resultSet.getLong(InstanceMetricTable.COLUMN_TIME_BUCKET));
return instanceMetric;
}
@Override protected final Map<String, Object> streamDataToH2Data(InstanceMetric streamData) {
Map<String, Object> source = new HashMap<>();
source.put(InstanceMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
source.put(InstanceMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
source.put(InstanceMetricTable.COLUMN_APPLICATION_ID, streamData.getApplicationId());
source.put(InstanceMetricTable.COLUMN_INSTANCE_ID, streamData.getInstanceId());
source.put(InstanceMetricTable.COLUMN_SOURCE_VALUE, streamData.getSourceValue());
source.put(InstanceMetricTable.COLUMN_TRANSACTION_CALLS, streamData.getTransactionCalls());
source.put(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, streamData.getTransactionErrorCalls());
source.put(InstanceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, streamData.getTransactionDurationSum());
source.put(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, streamData.getTransactionErrorDurationSum());
source.put(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, streamData.getBusinessTransactionCalls());
source.put(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, streamData.getBusinessTransactionErrorCalls());
source.put(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, streamData.getBusinessTransactionDurationSum());
source.put(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, streamData.getBusinessTransactionErrorDurationSum());
source.put(InstanceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, streamData.getMqTransactionCalls());
source.put(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, streamData.getMqTransactionErrorCalls());
source.put(InstanceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, streamData.getMqTransactionDurationSum());
source.put(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, streamData.getMqTransactionErrorDurationSum());
source.put(InstanceMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
return source;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.imp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceDayMetricH2PersistenceDAO extends AbstractInstanceMetricH2PersistenceDAO implements IInstanceDayMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceMetric> {
public InstanceDayMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.imp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceHourMetricH2PersistenceDAO extends AbstractInstanceMetricH2PersistenceDAO implements IInstanceHourMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceMetric> {
public InstanceHourMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.imp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceMinuteMetricH2PersistenceDAO extends AbstractInstanceMetricH2PersistenceDAO implements IInstanceMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceMetric> {
public InstanceMinuteMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.imp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceMonthMetricH2PersistenceDAO extends AbstractInstanceMetricH2PersistenceDAO implements IInstanceMonthMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceMetric> {
public InstanceMonthMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.irmp;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.AbstractPersistenceH2DAO;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractInstanceReferenceMetricH2PersistenceDAO extends AbstractPersistenceH2DAO<InstanceReferenceMetric> {
public AbstractInstanceReferenceMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected final InstanceReferenceMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
InstanceReferenceMetric instanceReferenceMetric = new InstanceReferenceMetric();
instanceReferenceMetric.setId(resultSet.getString(InstanceReferenceMetricTable.COLUMN_ID));
instanceReferenceMetric.setMetricId(resultSet.getString(InstanceReferenceMetricTable.COLUMN_METRIC_ID));
instanceReferenceMetric.setFrontApplicationId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID));
instanceReferenceMetric.setBehindApplicationId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID));
instanceReferenceMetric.setFrontInstanceId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID));
instanceReferenceMetric.setBehindInstanceId(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID));
instanceReferenceMetric.setSourceValue(resultSet.getInt(InstanceReferenceMetricTable.COLUMN_SOURCE_VALUE));
instanceReferenceMetric.setTransactionCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_CALLS));
instanceReferenceMetric.setTransactionErrorCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
instanceReferenceMetric.setTransactionDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
instanceReferenceMetric.setTransactionErrorDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
instanceReferenceMetric.setBusinessTransactionCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
instanceReferenceMetric.setBusinessTransactionErrorCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
instanceReferenceMetric.setBusinessTransactionDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
instanceReferenceMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
instanceReferenceMetric.setMqTransactionCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
instanceReferenceMetric.setMqTransactionErrorCalls(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
instanceReferenceMetric.setMqTransactionDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
instanceReferenceMetric.setMqTransactionErrorDurationSum(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
instanceReferenceMetric.setTimeBucket(resultSet.getLong(InstanceReferenceMetricTable.COLUMN_TIME_BUCKET));
return instanceReferenceMetric;
}
@Override protected final Map<String, Object> streamDataToH2Data(InstanceReferenceMetric streamData) {
Map<String, Object> source = new HashMap<>();
source.put(InstanceReferenceMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
source.put(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, streamData.getFrontApplicationId());
source.put(InstanceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, streamData.getBehindApplicationId());
source.put(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, streamData.getFrontInstanceId());
source.put(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, streamData.getBehindInstanceId());
source.put(InstanceReferenceMetricTable.COLUMN_SOURCE_VALUE, streamData.getSourceValue());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, streamData.getTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, streamData.getTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, streamData.getTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, streamData.getTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, streamData.getBusinessTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, streamData.getBusinessTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, streamData.getBusinessTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, streamData.getBusinessTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, streamData.getMqTransactionCalls());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, streamData.getMqTransactionErrorCalls());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, streamData.getMqTransactionDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, streamData.getMqTransactionErrorDurationSum());
source.put(InstanceReferenceMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
return source;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.irmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceDayMetricH2PersistenceDAO extends AbstractInstanceReferenceMetricH2PersistenceDAO implements IInstanceReferenceDayMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceReferenceMetric> {
public InstanceReferenceDayMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.irmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceHourMetricH2PersistenceDAO extends AbstractInstanceReferenceMetricH2PersistenceDAO implements IInstanceReferenceHourMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceReferenceMetric> {
public InstanceReferenceHourMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.irmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceMinuteMetricH2PersistenceDAO extends AbstractInstanceReferenceMetricH2PersistenceDAO implements IInstanceReferenceMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceReferenceMetric> {
public InstanceReferenceMinuteMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.irmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.irmp.IInstanceReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceMonthMetricH2PersistenceDAO extends AbstractInstanceReferenceMetricH2PersistenceDAO implements IInstanceReferenceMonthMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, InstanceReferenceMetric> {
public InstanceReferenceMonthMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.smp;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.AbstractPersistenceH2DAO;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractServiceMetricH2PersistenceDAO extends AbstractPersistenceH2DAO<ServiceMetric> {
public AbstractServiceMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected final ServiceMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
ServiceMetric serviceMetric = new ServiceMetric();
serviceMetric.setId(resultSet.getString(ServiceMetricTable.COLUMN_ID));
serviceMetric.setMetricId(resultSet.getString(ServiceMetricTable.COLUMN_METRIC_ID));
serviceMetric.setApplicationId(resultSet.getInt(ServiceMetricTable.COLUMN_APPLICATION_ID));
serviceMetric.setInstanceId(resultSet.getInt(ServiceMetricTable.COLUMN_INSTANCE_ID));
serviceMetric.setServiceId(resultSet.getInt(ServiceMetricTable.COLUMN_SERVICE_ID));
serviceMetric.setSourceValue(resultSet.getInt(ServiceMetricTable.COLUMN_SOURCE_VALUE));
serviceMetric.setTransactionCalls(resultSet.getLong(ServiceMetricTable.COLUMN_TRANSACTION_CALLS));
serviceMetric.setTransactionErrorCalls(resultSet.getLong(ServiceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
serviceMetric.setTransactionDurationSum(resultSet.getLong(ServiceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
serviceMetric.setTransactionErrorDurationSum(resultSet.getLong(ServiceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
serviceMetric.setBusinessTransactionCalls(resultSet.getLong(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
serviceMetric.setBusinessTransactionErrorCalls(resultSet.getLong(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
serviceMetric.setBusinessTransactionDurationSum(resultSet.getLong(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
serviceMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
serviceMetric.setMqTransactionCalls(resultSet.getLong(ServiceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
serviceMetric.setMqTransactionErrorCalls(resultSet.getLong(ServiceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
serviceMetric.setMqTransactionDurationSum(resultSet.getLong(ServiceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
serviceMetric.setMqTransactionErrorDurationSum(resultSet.getLong(ServiceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
serviceMetric.setTimeBucket(resultSet.getLong(ServiceMetricTable.COLUMN_TIME_BUCKET));
return serviceMetric;
}
@Override protected final Map<String, Object> streamDataToH2Data(ServiceMetric streamData) {
Map<String, Object> source = new HashMap<>();
source.put(ServiceMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
source.put(ServiceMetricTable.COLUMN_APPLICATION_ID, streamData.getApplicationId());
source.put(ServiceMetricTable.COLUMN_INSTANCE_ID, streamData.getInstanceId());
source.put(ServiceMetricTable.COLUMN_SERVICE_ID, streamData.getServiceId());
source.put(ServiceMetricTable.COLUMN_SOURCE_VALUE, streamData.getSourceValue());
source.put(ServiceMetricTable.COLUMN_TRANSACTION_CALLS, streamData.getTransactionCalls());
source.put(ServiceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, streamData.getTransactionErrorCalls());
source.put(ServiceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, streamData.getTransactionDurationSum());
source.put(ServiceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, streamData.getTransactionErrorDurationSum());
source.put(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, streamData.getBusinessTransactionCalls());
source.put(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, streamData.getBusinessTransactionErrorCalls());
source.put(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, streamData.getBusinessTransactionDurationSum());
source.put(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, streamData.getBusinessTransactionErrorDurationSum());
source.put(ServiceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, streamData.getMqTransactionCalls());
source.put(ServiceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, streamData.getMqTransactionErrorCalls());
source.put(ServiceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, streamData.getMqTransactionDurationSum());
source.put(ServiceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, streamData.getMqTransactionErrorDurationSum());
source.put(ServiceMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
return source;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.smp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceDayMetricH2PersistenceDAO extends AbstractServiceMetricH2PersistenceDAO implements IServiceDayMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceMetric> {
public ServiceDayMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.smp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceHourMetricH2PersistenceDAO extends AbstractServiceMetricH2PersistenceDAO implements IServiceHourMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceMetric> {
public ServiceHourMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.smp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceMinuteMetricH2PersistenceDAO extends AbstractServiceMetricH2PersistenceDAO implements IServiceMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceMetric> {
public ServiceMinuteMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.smp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceMonthMetricH2PersistenceDAO extends AbstractServiceMetricH2PersistenceDAO implements IServiceMonthMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceMetric> {
public ServiceMonthMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.srmp;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.storage.h2.base.dao.AbstractPersistenceH2DAO;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractServiceReferenceMetricH2PersistenceDAO extends AbstractPersistenceH2DAO<ServiceReferenceMetric> {
AbstractServiceReferenceMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected final ServiceReferenceMetric h2DataToStreamData(ResultSet resultSet) throws SQLException {
ServiceReferenceMetric serviceReferenceMetric = new ServiceReferenceMetric();
serviceReferenceMetric.setId(resultSet.getString(ServiceReferenceMetricTable.COLUMN_ID));
serviceReferenceMetric.setMetricId(resultSet.getString(ServiceReferenceMetricTable.COLUMN_METRIC_ID));
serviceReferenceMetric.setFrontApplicationId(resultSet.getInt(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID));
serviceReferenceMetric.setBehindApplicationId(resultSet.getInt(ServiceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID));
serviceReferenceMetric.setFrontInstanceId(resultSet.getInt(ServiceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID));
serviceReferenceMetric.setBehindInstanceId(resultSet.getInt(ServiceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID));
serviceReferenceMetric.setFrontServiceId(resultSet.getInt(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID));
serviceReferenceMetric.setBehindServiceId(resultSet.getInt(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID));
serviceReferenceMetric.setSourceValue(resultSet.getInt(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE));
serviceReferenceMetric.setTransactionCalls(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_CALLS));
serviceReferenceMetric.setTransactionErrorCalls(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS));
serviceReferenceMetric.setTransactionDurationSum(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM));
serviceReferenceMetric.setTransactionErrorDurationSum(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM));
serviceReferenceMetric.setBusinessTransactionCalls(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS));
serviceReferenceMetric.setBusinessTransactionErrorCalls(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS));
serviceReferenceMetric.setBusinessTransactionDurationSum(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM));
serviceReferenceMetric.setBusinessTransactionErrorDurationSum(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM));
serviceReferenceMetric.setMqTransactionCalls(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS));
serviceReferenceMetric.setMqTransactionErrorCalls(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS));
serviceReferenceMetric.setMqTransactionDurationSum(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM));
serviceReferenceMetric.setMqTransactionErrorDurationSum(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM));
serviceReferenceMetric.setTimeBucket(resultSet.getLong(ServiceReferenceMetricTable.COLUMN_TIME_BUCKET));
return serviceReferenceMetric;
}
@Override protected final Map<String, Object> streamDataToH2Data(ServiceReferenceMetric streamData) {
Map<String, Object> source = new HashMap<>();
source.put(ServiceReferenceMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
source.put(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, streamData.getFrontApplicationId());
source.put(ServiceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, streamData.getBehindApplicationId());
source.put(ServiceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, streamData.getFrontInstanceId());
source.put(ServiceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, streamData.getBehindInstanceId());
source.put(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID, streamData.getFrontServiceId());
source.put(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID, streamData.getBehindServiceId());
source.put(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE, streamData.getSourceValue());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, streamData.getTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, streamData.getTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, streamData.getTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, streamData.getTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, streamData.getBusinessTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, streamData.getBusinessTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, streamData.getBusinessTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, streamData.getBusinessTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, streamData.getMqTransactionCalls());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, streamData.getMqTransactionErrorCalls());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, streamData.getMqTransactionDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, streamData.getMqTransactionErrorDurationSum());
source.put(ServiceReferenceMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
return source;
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.srmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDayMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceDayMetricH2PersistenceDAO extends AbstractServiceReferenceMetricH2PersistenceDAO implements IServiceReferenceDayMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceReferenceMetric> {
public ServiceReferenceDayMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.srmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceHourMetricH2PersistenceDAO extends AbstractServiceReferenceMetricH2PersistenceDAO implements IServiceReferenceHourMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceReferenceMetric> {
public ServiceReferenceHourMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.srmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceMinuteMetricH2PersistenceDAO extends AbstractServiceReferenceMetricH2PersistenceDAO implements IServiceReferenceMinuteMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceReferenceMetric> {
public ServiceReferenceMinuteMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.dao.srmp;
import org.apache.skywalking.apm.collector.client.h2.H2Client;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceMonthMetricH2PersistenceDAO extends AbstractServiceReferenceMetricH2PersistenceDAO implements IServiceReferenceMonthMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, ServiceReferenceMetric> {
public ServiceReferenceMonthMetricH2PersistenceDAO(H2Client client) {
super(client);
}
@Override protected String tableName() {
return ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName();
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.amp;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractApplicationMetricH2TableDefine extends H2TableDefine {
public AbstractApplicationMetricH2TableDefine(String name) {
super(name);
}
@Override public final void initialize() {
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_METRIC_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_SOURCE_VALUE, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_SATISFIED_COUNT, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_TOLERATING_COUNT, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_FRUSTRATED_COUNT, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationMetricTable.COLUMN_TIME_BUCKET, H2ColumnDefine.Type.Bigint.name()));
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.amp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationDayMetricH2TableDefine extends AbstractApplicationMetricH2TableDefine {
public ApplicationDayMetricH2TableDefine() {
super(ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.amp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationHourMetricH2TableDefine extends AbstractApplicationMetricH2TableDefine {
public ApplicationHourMetricH2TableDefine() {
super(ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.amp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationMinuteMetricH2TableDefine extends AbstractApplicationMetricH2TableDefine {
public ApplicationMinuteMetricH2TableDefine() {
super(ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.amp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationMonthMetricH2TableDefine extends AbstractApplicationMetricH2TableDefine {
public ApplicationMonthMetricH2TableDefine() {
super(ApplicationMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.armp;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractApplicationReferenceMetricH2TableDefine extends H2TableDefine {
AbstractApplicationReferenceMetricH2TableDefine(String name) {
super(name);
}
@Override public final void initialize() {
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_METRIC_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_SOURCE_VALUE, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_SATISFIED_COUNT, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_TOLERATING_COUNT, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_FRUSTRATED_COUNT, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ApplicationReferenceMetricTable.COLUMN_TIME_BUCKET, H2ColumnDefine.Type.Bigint.name()));
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.armp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceDayMetricH2TableDefine extends AbstractApplicationReferenceMetricH2TableDefine {
public ApplicationReferenceDayMetricH2TableDefine() {
super(ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.armp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceHourMetricH2TableDefine extends AbstractApplicationReferenceMetricH2TableDefine {
public ApplicationReferenceHourMetricH2TableDefine() {
super(ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.armp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceMinuteMetricH2TableDefine extends AbstractApplicationReferenceMetricH2TableDefine {
public ApplicationReferenceMinuteMetricH2TableDefine() {
super(ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.armp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ApplicationReferenceMonthMetricH2TableDefine extends AbstractApplicationReferenceMetricH2TableDefine {
public ApplicationReferenceMonthMetricH2TableDefine() {
super(ApplicationReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.imp;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractInstanceMetricH2TableDefine extends H2TableDefine {
AbstractInstanceMetricH2TableDefine(String name) {
super(name);
}
@Override public final void initialize() {
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_METRIC_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_INSTANCE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_SOURCE_VALUE, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceMetricTable.COLUMN_TIME_BUCKET, H2ColumnDefine.Type.Bigint.name()));
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.imp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceDayMetricH2TableDefine extends AbstractInstanceMetricH2TableDefine {
public InstanceDayMetricH2TableDefine() {
super(InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.imp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceHourMetricH2TableDefine extends AbstractInstanceMetricH2TableDefine {
public InstanceHourMetricH2TableDefine() {
super(InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.imp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceMinuteMetricH2TableDefine extends AbstractInstanceMetricH2TableDefine {
public InstanceMinuteMetricH2TableDefine() {
super(InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.imp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceMonthMetricH2TableDefine extends AbstractInstanceMetricH2TableDefine {
public InstanceMonthMetricH2TableDefine() {
super(InstanceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.irmp;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractInstanceReferenceMetricH2TableDefine extends H2TableDefine {
AbstractInstanceReferenceMetricH2TableDefine(String name) {
super(name);
}
@Override public final void initialize() {
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_METRIC_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_SOURCE_VALUE, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(InstanceReferenceMetricTable.COLUMN_TIME_BUCKET, H2ColumnDefine.Type.Bigint.name()));
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.irmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceDayMetricH2TableDefine extends AbstractInstanceReferenceMetricH2TableDefine {
public InstanceReferenceDayMetricH2TableDefine() {
super(InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.irmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceHourMetricH2TableDefine extends AbstractInstanceReferenceMetricH2TableDefine {
public InstanceReferenceHourMetricH2TableDefine() {
super(InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.irmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceMinuteMetricH2TableDefine extends AbstractInstanceReferenceMetricH2TableDefine {
public InstanceReferenceMinuteMetricH2TableDefine() {
super(InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.irmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class InstanceReferenceMonthMetricH2TableDefine extends AbstractInstanceReferenceMetricH2TableDefine {
public InstanceReferenceMonthMetricH2TableDefine() {
super(InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.smp;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractServiceMetricH2TableDefine extends H2TableDefine {
AbstractServiceMetricH2TableDefine(String name) {
super(name);
}
@Override public final void initialize() {
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_METRIC_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_INSTANCE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_SERVICE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_SOURCE_VALUE, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceMetricTable.COLUMN_TIME_BUCKET, H2ColumnDefine.Type.Bigint.name()));
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.smp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceDayMetricH2TableDefine extends AbstractServiceMetricH2TableDefine {
public ServiceDayMetricH2TableDefine() {
super(ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.smp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceHourMetricH2TableDefine extends AbstractServiceMetricH2TableDefine {
public ServiceHourMetricH2TableDefine() {
super(ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.smp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceMinuteMetricH2TableDefine extends AbstractServiceMetricH2TableDefine {
public ServiceMinuteMetricH2TableDefine() {
super(ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.smp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceMonthMetricH2TableDefine extends AbstractServiceMetricH2TableDefine {
public ServiceMonthMetricH2TableDefine() {
super(ServiceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.srmp;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2ColumnDefine;
import org.apache.skywalking.apm.collector.storage.h2.base.define.H2TableDefine;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public abstract class AbstractServiceReferenceMetricH2TableDefine extends H2TableDefine {
public AbstractServiceReferenceMetricH2TableDefine(String name) {
super(name);
}
@Override public final void initialize() {
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_METRIC_ID, H2ColumnDefine.Type.Varchar.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_FRONT_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_FRONT_INSTANCE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_FRONT_SERVICE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_BEHIND_APPLICATION_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_BEHIND_INSTANCE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_BEHIND_SERVICE_ID, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_SOURCE_VALUE, H2ColumnDefine.Type.Int.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_CALLS, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_MQ_TRANSACTION_ERROR_DURATION_SUM, H2ColumnDefine.Type.Bigint.name()));
addColumn(new H2ColumnDefine(ServiceReferenceMetricTable.COLUMN_TIME_BUCKET, H2ColumnDefine.Type.Bigint.name()));
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.srmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceDayMetricH2TableDefine extends AbstractServiceReferenceMetricH2TableDefine {
public ServiceReferenceDayMetricH2TableDefine() {
super(ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.srmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceHourMetricH2TableDefine extends AbstractServiceReferenceMetricH2TableDefine {
public ServiceReferenceHourMetricH2TableDefine() {
super(ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.srmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceMinuteMetricH2TableDefine extends AbstractServiceReferenceMetricH2TableDefine {
public ServiceReferenceMinuteMetricH2TableDefine() {
super(ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName());
}
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.apache.skywalking.apm.collector.storage.h2.define.srmp;
import org.apache.skywalking.apm.collector.core.storage.TimePyramid;
import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable;
/**
* @author peng-yongsheng
*/
public class ServiceReferenceMonthMetricH2TableDefine extends AbstractServiceReferenceMetricH2TableDefine {
public ServiceReferenceMonthMetricH2TableDefine() {
super(ServiceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName());
}
}
...@@ -44,4 +44,34 @@ org.apache.skywalking.apm.collector.storage.h2.define.instmapping.InstanceMappin ...@@ -44,4 +44,34 @@ org.apache.skywalking.apm.collector.storage.h2.define.instmapping.InstanceMappin
org.apache.skywalking.apm.collector.storage.h2.define.GlobalTraceH2TableDefine org.apache.skywalking.apm.collector.storage.h2.define.GlobalTraceH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.SegmentCostH2TableDefine org.apache.skywalking.apm.collector.storage.h2.define.SegmentCostH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.SegmentH2TableDefine org.apache.skywalking.apm.collector.storage.h2.define.SegmentH2TableDefine
\ No newline at end of file
org.apache.skywalking.apm.collector.storage.h2.define.amp.ApplicationMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.amp.ApplicationHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.amp.ApplicationDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.amp.ApplicationMonthMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.armp.ApplicationReferenceMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.armp.ApplicationReferenceHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.armp.ApplicationReferenceDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.armp.ApplicationReferenceMonthMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.imp.InstanceMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.imp.InstanceHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.imp.InstanceDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.imp.InstanceMonthMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.irmp.InstanceReferenceMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.irmp.InstanceReferenceHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.irmp.InstanceReferenceDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.irmp.InstanceReferenceMonthMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.smp.ServiceMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.smp.ServiceHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.smp.ServiceDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.smp.ServiceMonthMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.srmp.ServiceReferenceMinuteMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.srmp.ServiceReferenceHourMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.srmp.ServiceReferenceDayMetricH2TableDefine
org.apache.skywalking.apm.collector.storage.h2.define.srmp.ServiceReferenceMonthMetricH2TableDefine
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册