diff --git a/apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingDayPersistenceWorker.java b/apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingDayPersistenceWorker.java index b188b39a7..71600093e 100644 --- a/apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingDayPersistenceWorker.java +++ b/apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingDayPersistenceWorker.java @@ -25,7 +25,6 @@ import org.apache.skywalking.apm.collector.core.module.ModuleManager; import org.apache.skywalking.apm.collector.storage.StorageModule; import org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO; import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingDayPersistenceDAO; -import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMinutePersistenceDAO; import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping; /** diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/InstanceDayMetricEsPersistenceDAO.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/InstanceDayMetricEsPersistenceDAO.java index 3141571c3..ae46e6e56 100644 --- a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/InstanceDayMetricEsPersistenceDAO.java +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/imp/InstanceDayMetricEsPersistenceDAO.java @@ -22,7 +22,6 @@ import org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchCli 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.dao.imp.IInstanceMinuteMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric; import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetricTable; import org.elasticsearch.action.index.IndexRequestBuilder; diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/InstanceReferenceMinuteMetricEsPersistenceDAO.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/InstanceReferenceMinuteMetricEsPersistenceDAO.java index a9621d675..85d43c2af 100644 --- a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/InstanceReferenceMinuteMetricEsPersistenceDAO.java +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/irmp/InstanceReferenceMinuteMetricEsPersistenceDAO.java @@ -21,7 +21,7 @@ package org.apache.skywalking.apm.collector.storage.es.dao.irmp; import org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient; 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.dao.irmp.IInstanceReferenceMinuteMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric; import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetricTable; import org.elasticsearch.action.index.IndexRequestBuilder; @@ -30,13 +30,13 @@ import org.elasticsearch.action.update.UpdateRequestBuilder; /** * @author peng-yongsheng */ -public class InstanceReferenceMinuteMetricEsPersistenceDAO extends AbstractInstanceReferenceMetricEsPersistenceDAO implements IInstanceReferenceHourMetricPersistenceDAO { +public class InstanceReferenceMinuteMetricEsPersistenceDAO extends AbstractInstanceReferenceMetricEsPersistenceDAO implements IInstanceReferenceMinuteMetricPersistenceDAO { public InstanceReferenceMinuteMetricEsPersistenceDAO(ElasticSearchClient client) { super(client); } @Override protected String tableName() { - return InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName(); + return InstanceReferenceMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName(); } } diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/MemoryMinuteMetricEsPersistenceDAO.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/MemoryMinuteMetricEsPersistenceDAO.java index 12bd464e8..574b50300 100644 --- a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/MemoryMinuteMetricEsPersistenceDAO.java +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/memorymp/MemoryMinuteMetricEsPersistenceDAO.java @@ -22,7 +22,6 @@ import org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchCli 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.memorymp.IMemoryMinuteMetricPersistenceDAO; -import org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemorySecondMetricPersistenceDAO; import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryMetric; import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryMetricTable; import org.elasticsearch.action.index.IndexRequestBuilder; diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/ApplicationComponentEsTableDefine.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/AbstractApplicationComponentEsTableDefine.java similarity index 81% rename from apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/ApplicationComponentEsTableDefine.java rename to apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/AbstractApplicationComponentEsTableDefine.java index 19f749880..4e5146d60 100644 --- a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/ApplicationComponentEsTableDefine.java +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/AbstractApplicationComponentEsTableDefine.java @@ -16,27 +16,22 @@ * */ - -package org.apache.skywalking.apm.collector.storage.es.define; +package org.apache.skywalking.apm.collector.storage.es.define.appcomp; import org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchColumnDefine; -import org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponentTable; import org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchTableDefine; +import org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponentTable; /** * @author peng-yongsheng */ -public class ApplicationComponentEsTableDefine extends ElasticSearchTableDefine { +public abstract class AbstractApplicationComponentEsTableDefine extends ElasticSearchTableDefine { - public ApplicationComponentEsTableDefine() { - super(ApplicationComponentTable.TABLE); + AbstractApplicationComponentEsTableDefine(String name) { + super(name); } - @Override public int refreshInterval() { - return 2; - } - - @Override public void initialize() { + @Override public final void initialize() { addColumn(new ElasticSearchColumnDefine(ApplicationComponentTable.COLUMN_COMPONENT_ID, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(ApplicationComponentTable.COLUMN_PEER_ID, ElasticSearchColumnDefine.Type.Integer.name())); addColumn(new ElasticSearchColumnDefine(ApplicationComponentTable.COLUMN_TIME_BUCKET, ElasticSearchColumnDefine.Type.Long.name())); diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentDayEsTableDefine.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentDayEsTableDefine.java new file mode 100644 index 000000000..2f8aee8f9 --- /dev/null +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentDayEsTableDefine.java @@ -0,0 +1,37 @@ +/* + * 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.es.define.appcomp; + +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.ApplicationComponentTable; + +/** + * @author peng-yongsheng + */ +public class ApplicationComponentDayEsTableDefine extends AbstractApplicationComponentEsTableDefine { + + public ApplicationComponentDayEsTableDefine() { + super(ApplicationComponentTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName()); + } + + @Override public int refreshInterval() { + return 2; + } +} diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentHourEsTableDefine.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentHourEsTableDefine.java new file mode 100644 index 000000000..5a41d1abb --- /dev/null +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentHourEsTableDefine.java @@ -0,0 +1,37 @@ +/* + * 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.es.define.appcomp; + +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.ApplicationComponentTable; + +/** + * @author peng-yongsheng + */ +public class ApplicationComponentHourEsTableDefine extends AbstractApplicationComponentEsTableDefine { + + public ApplicationComponentHourEsTableDefine() { + super(ApplicationComponentTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName()); + } + + @Override public int refreshInterval() { + return 2; + } +} diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentMinuteEsTableDefine.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentMinuteEsTableDefine.java new file mode 100644 index 000000000..0fc4e3e35 --- /dev/null +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentMinuteEsTableDefine.java @@ -0,0 +1,37 @@ +/* + * 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.es.define.appcomp; + +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.ApplicationComponentTable; + +/** + * @author peng-yongsheng + */ +public class ApplicationComponentMinuteEsTableDefine extends AbstractApplicationComponentEsTableDefine { + + public ApplicationComponentMinuteEsTableDefine() { + super(ApplicationComponentTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName()); + } + + @Override public int refreshInterval() { + return 2; + } +} diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentMonthEsTableDefine.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentMonthEsTableDefine.java new file mode 100644 index 000000000..a4e1573ad --- /dev/null +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/appcomp/ApplicationComponentMonthEsTableDefine.java @@ -0,0 +1,37 @@ +/* + * 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.es.define.appcomp; + +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.ApplicationComponentTable; + +/** + * @author peng-yongsheng + */ +public class ApplicationComponentMonthEsTableDefine extends AbstractApplicationComponentEsTableDefine { + + public ApplicationComponentMonthEsTableDefine() { + super(ApplicationComponentTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName()); + } + + @Override public int refreshInterval() { + return 2; + } +} diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define index c3efd65dc..1d76904c3 100644 --- a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define +++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define @@ -1,33 +1,5 @@ -org.apache.skywalking.apm.collector.storage.es.define.NetworkAddressEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationAlarmEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationAlarmListEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationReferenceMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationReferenceAlarmEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationReferenceAlarmListEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceAlarmEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceAlarmListEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceReferenceMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceReferenceAlarmEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceReferenceAlarmListEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceNameEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.CpuMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.GCMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.MemoryMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.MemoryPoolMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.GlobalTraceEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationComponentEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ApplicationMappingEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.InstanceMappingEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.SegmentCostEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.SegmentEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceEntryEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceAlarmEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceAlarmListEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceReferenceMetricEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceReferenceAlarmEsTableDefine -org.apache.skywalking.apm.collector.storage.es.define.ServiceReferenceAlarmListEsTableDefine +org.apache.skywalking.apm.collector.storage.es.define.appcomp.ApplicationComponentMinuteEsTableDefine +org.apache.skywalking.apm.collector.storage.es.define.appcomp.ApplicationComponentHourEsTableDefine +org.apache.skywalking.apm.collector.storage.es.define.appcomp.ApplicationComponentDayEsTableDefine +org.apache.skywalking.apm.collector.storage.es.define.appcomp.ApplicationComponentMonthEsTableDefine +