GC metric pyramid aggregate.
This commit is contained in:
parent
f77c10d59d
commit
d822fe20ef
|
|
@ -33,7 +33,17 @@ public class WorkerIdDefine {
|
|||
public static final int CPU_MONTH_METRIC_PERSISTENCE_WORKER_ID = 3008;
|
||||
public static final int CPU_MONTH_METRIC_TRANSFORM_NODE_ID = 3009;
|
||||
|
||||
public static final int GC_METRIC_PERSISTENCE_WORKER_ID = 301;
|
||||
public static final int GC_METRIC_BRIDGE_NODE_ID = 3100;
|
||||
public static final int GC_SECOND_METRIC_PERSISTENCE_WORKER_ID = 3101;
|
||||
public static final int GC_MINUTE_METRIC_PERSISTENCE_WORKER_ID = 3102;
|
||||
public static final int GC_MINUTE_METRIC_TRANSFORM_NODE_ID = 3103;
|
||||
public static final int GC_HOUR_METRIC_PERSISTENCE_WORKER_ID = 3104;
|
||||
public static final int GC_HOUR_METRIC_TRANSFORM_NODE_ID = 3105;
|
||||
public static final int GC_DAY_METRIC_PERSISTENCE_WORKER_ID = 3106;
|
||||
public static final int GC_DAY_METRIC_TRANSFORM_NODE_ID = 3107;
|
||||
public static final int GC_MONTH_METRIC_PERSISTENCE_WORKER_ID = 3108;
|
||||
public static final int GC_MONTH_METRIC_TRANSFORM_NODE_ID = 3109;
|
||||
|
||||
public static final int INST_HEART_BEAT_PERSISTENCE_WORKER_ID = 302;
|
||||
public static final int MEMORY_METRIC_PERSISTENCE_WORKER_ID = 303;
|
||||
public static final int MEMORY_POOL_METRIC_PERSISTENCE_WORKER_ID = 303;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import org.apache.skywalking.apm.collector.analysis.jvm.provider.service.Instanc
|
|||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.service.MemoryMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.service.MemoryPoolMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.cpu.CpuMetricPersistenceGraph;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.GCMetricPersistenceGraph;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.gc.GCMetricPersistenceGraph;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.InstanceHeartBeatPersistenceGraph;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.MemoryMetricPersistenceGraph;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.MemoryPoolMetricPersistenceGraph;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider;
|
||||
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.gcmp.IGCDayMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCDayMetricPersistenceWorker extends PersistenceWorker<GCMetric> {
|
||||
|
||||
public GCDayMetricPersistenceWorker(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_DAY_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override protected IPersistenceDAO<?, ?, GCMetric> persistenceDAO() {
|
||||
return getModuleManager().find(StorageModule.NAME).getService(IGCDayMetricPersistenceDAO.class);
|
||||
}
|
||||
|
||||
public static class Factory extends PersistenceWorkerProvider<GCMetric, GCDayMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public GCDayMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
return new GCDayMetricPersistenceWorker(moduleManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queueSize() {
|
||||
return 1024;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Next;
|
||||
import org.apache.skywalking.apm.collector.core.graph.NodeProcessor;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCDayMetricTransformNode implements NodeProcessor<GCMetric, GCMetric> {
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_DAY_METRIC_TRANSFORM_NODE_ID;
|
||||
}
|
||||
|
||||
@Override public void process(GCMetric gcMetric, Next<GCMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToDay(gcMetric.getTimeBucket());
|
||||
gcMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + gcMetric.getMetricId());
|
||||
gcMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(gcMetric);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider;
|
||||
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.gcmp.IGCHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCHourMetricPersistenceWorker extends PersistenceWorker<GCMetric> {
|
||||
|
||||
public GCHourMetricPersistenceWorker(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_HOUR_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override protected IPersistenceDAO<?, ?, GCMetric> persistenceDAO() {
|
||||
return getModuleManager().find(StorageModule.NAME).getService(IGCHourMetricPersistenceDAO.class);
|
||||
}
|
||||
|
||||
public static class Factory extends PersistenceWorkerProvider<GCMetric, GCHourMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public GCHourMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
return new GCHourMetricPersistenceWorker(moduleManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queueSize() {
|
||||
return 1024;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Next;
|
||||
import org.apache.skywalking.apm.collector.core.graph.NodeProcessor;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCHourMetricTransformNode implements NodeProcessor<GCMetric, GCMetric> {
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_HOUR_METRIC_TRANSFORM_NODE_ID;
|
||||
}
|
||||
|
||||
@Override public void process(GCMetric gcMetric, Next<GCMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToHour(gcMetric.getTimeBucket());
|
||||
gcMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + gcMetric.getMetricId());
|
||||
gcMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(gcMetric);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Next;
|
||||
import org.apache.skywalking.apm.collector.core.graph.NodeProcessor;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMetricBridgeNode implements NodeProcessor<GCMetric, GCMetric> {
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_METRIC_BRIDGE_NODE_ID;
|
||||
}
|
||||
|
||||
@Override public void process(GCMetric metric, Next<GCMetric> next) {
|
||||
next.execute(metric);
|
||||
}
|
||||
}
|
||||
|
|
@ -16,11 +16,12 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker;
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Node;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
|
|
@ -38,7 +39,21 @@ public class GCMetricPersistenceGraph {
|
|||
}
|
||||
|
||||
public void create() {
|
||||
GraphManager.INSTANCE.createIfAbsent(GraphIdDefine.GC_METRIC_PERSISTENCE_GRAPH_ID, GCMetric.class)
|
||||
.addNode(new GCMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
|
||||
Node<GCMetric, GCMetric> bridgeNode = GraphManager.INSTANCE.createIfAbsent(GraphIdDefine.GC_METRIC_PERSISTENCE_GRAPH_ID, GCMetric.class)
|
||||
.addNode(new GCMetricBridgeNode());
|
||||
|
||||
bridgeNode.addNext(new GCSecondMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
|
||||
|
||||
bridgeNode.addNext(new GCMinuteMetricTransformNode())
|
||||
.addNext(new GCMinuteMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
|
||||
|
||||
bridgeNode.addNext(new GCHourMetricTransformNode())
|
||||
.addNext(new GCHourMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
|
||||
|
||||
bridgeNode.addNext(new GCDayMetricTransformNode())
|
||||
.addNext(new GCDayMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
|
||||
|
||||
bridgeNode.addNext(new GCMonthMetricTransformNode())
|
||||
.addNext(new GCMonthMetricPersistenceWorker.Factory(moduleManager).create(workerCreateListener));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider;
|
||||
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.gcmp.IGCMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMinuteMetricPersistenceWorker extends PersistenceWorker<GCMetric> {
|
||||
|
||||
public GCMinuteMetricPersistenceWorker(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_MINUTE_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override protected IPersistenceDAO<?, ?, GCMetric> persistenceDAO() {
|
||||
return getModuleManager().find(StorageModule.NAME).getService(IGCMinuteMetricPersistenceDAO.class);
|
||||
}
|
||||
|
||||
public static class Factory extends PersistenceWorkerProvider<GCMetric, GCMinuteMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public GCMinuteMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
return new GCMinuteMetricPersistenceWorker(moduleManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queueSize() {
|
||||
return 1024;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Next;
|
||||
import org.apache.skywalking.apm.collector.core.graph.NodeProcessor;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMinuteMetricTransformNode implements NodeProcessor<GCMetric, GCMetric> {
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_MINUTE_METRIC_TRANSFORM_NODE_ID;
|
||||
}
|
||||
|
||||
@Override public void process(GCMetric gcMetric, Next<GCMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToMinute(gcMetric.getTimeBucket());
|
||||
gcMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + gcMetric.getMetricId());
|
||||
gcMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(gcMetric);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider;
|
||||
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.gcmp.IGCMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMonthMetricPersistenceWorker extends PersistenceWorker<GCMetric> {
|
||||
|
||||
public GCMonthMetricPersistenceWorker(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_MONTH_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override protected IPersistenceDAO<?, ?, GCMetric> persistenceDAO() {
|
||||
return getModuleManager().find(StorageModule.NAME).getService(IGCMonthMetricPersistenceDAO.class);
|
||||
}
|
||||
|
||||
public static class Factory extends PersistenceWorkerProvider<GCMetric, GCMonthMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public GCMonthMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
return new GCMonthMetricPersistenceWorker(moduleManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int queueSize() {
|
||||
return 1024;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Next;
|
||||
import org.apache.skywalking.apm.collector.core.graph.NodeProcessor;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMonthMetricTransformNode implements NodeProcessor<GCMetric, GCMetric> {
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_MONTH_METRIC_TRANSFORM_NODE_ID;
|
||||
}
|
||||
|
||||
@Override public void process(GCMetric gcMetric, Next<GCMetric> next) {
|
||||
long timeBucket = TimeBucketUtils.INSTANCE.secondToMonth(gcMetric.getTimeBucket());
|
||||
gcMetric.setId(String.valueOf(timeBucket) + Const.ID_SPLIT + gcMetric.getMetricId());
|
||||
gcMetric.setTimeBucket(timeBucket);
|
||||
|
||||
next.execute(gcMetric);
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker;
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.gc;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
|
|
@ -24,20 +24,20 @@ import org.apache.skywalking.apm.collector.analysis.worker.model.impl.Persistenc
|
|||
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.IGCMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMetricPersistenceWorker extends PersistenceWorker<GCMetric> {
|
||||
public class GCSecondMetricPersistenceWorker extends PersistenceWorker<GCMetric> {
|
||||
|
||||
public GCMetricPersistenceWorker(ModuleManager moduleManager) {
|
||||
public GCSecondMetricPersistenceWorker(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public int id() {
|
||||
return WorkerIdDefine.GC_METRIC_PERSISTENCE_WORKER_ID;
|
||||
return WorkerIdDefine.GC_SECOND_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
|
|
@ -46,17 +46,17 @@ public class GCMetricPersistenceWorker extends PersistenceWorker<GCMetric> {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override protected IPersistenceDAO<?, ?, GCMetric> persistenceDAO() {
|
||||
return getModuleManager().find(StorageModule.NAME).getService(IGCMetricPersistenceDAO.class);
|
||||
return getModuleManager().find(StorageModule.NAME).getService(IGCSecondMetricPersistenceDAO.class);
|
||||
}
|
||||
|
||||
public static class Factory extends PersistenceWorkerProvider<GCMetric, GCMetricPersistenceWorker> {
|
||||
public static class Factory extends PersistenceWorkerProvider<GCMetric, GCSecondMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public GCMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
return new GCMetricPersistenceWorker(moduleManager);
|
||||
@Override public GCSecondMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
return new GCSecondMetricPersistenceWorker(moduleManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -37,7 +37,7 @@ import org.apache.skywalking.apm.collector.storage.dao.IApplicationReferenceMetr
|
|||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationRegisterDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
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.IGlobalTraceUIDAO;
|
||||
|
|
@ -115,7 +115,7 @@ public class StorageModule extends Module {
|
|||
|
||||
private void addPersistenceDAO(List<Class> classes) {
|
||||
classes.add(ICpuSecondMetricPersistenceDAO.class);
|
||||
classes.add(IGCMetricPersistenceDAO.class);
|
||||
classes.add(IGCSecondMetricPersistenceDAO.class);
|
||||
classes.add(IMemoryMetricPersistenceDAO.class);
|
||||
classes.add(IMemoryPoolMetricPersistenceDAO.class);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.dao;
|
||||
package org.apache.skywalking.apm.collector.storage.dao.gcmp;
|
||||
|
||||
import org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
|
@ -24,5 +24,5 @@ import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
|||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public interface IGCMetricPersistenceDAO<Insert, Update, DataImpl extends GCMetric> extends IPersistenceDAO<Insert, Update, DataImpl> {
|
||||
public interface IGCDayMetricPersistenceDAO<INSERT, UPDATE, STREAM_DATA extends GCMetric> extends IPersistenceDAO<INSERT, UPDATE, STREAM_DATA> {
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
import org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public interface IGCHourMetricPersistenceDAO<INSERT, UPDATE, STREAM_DATA extends GCMetric> extends IPersistenceDAO<INSERT, UPDATE, STREAM_DATA> {
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
import org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public interface IGCMinuteMetricPersistenceDAO<INSERT, UPDATE, STREAM_DATA extends GCMetric> extends IPersistenceDAO<INSERT, UPDATE, STREAM_DATA> {
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
import org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public interface IGCMonthMetricPersistenceDAO<INSERT, UPDATE, STREAM_DATA extends GCMetric> extends IPersistenceDAO<INSERT, UPDATE, STREAM_DATA> {
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
import org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public interface IGCSecondMetricPersistenceDAO<INSERT, UPDATE, STREAM_DATA extends GCMetric> extends IPersistenceDAO<INSERT, UPDATE, STREAM_DATA> {
|
||||
}
|
||||
|
|
@ -67,7 +67,6 @@ public class CpuMetric extends StreamData {
|
|||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setDataString(1, metricId);
|
||||
|
||||
}
|
||||
|
||||
public Integer getInstanceId() {
|
||||
|
|
|
|||
|
|
@ -16,21 +16,21 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.storage.table.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.data.Column;
|
||||
import org.apache.skywalking.apm.collector.core.data.AbstractData;
|
||||
import org.apache.skywalking.apm.collector.core.data.StreamData;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.CoverOperation;
|
||||
import org.apache.skywalking.apm.collector.core.data.operator.NonOperation;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMetric extends AbstractData {
|
||||
public class GCMetric extends StreamData {
|
||||
|
||||
private static final Column[] STRING_COLUMNS = {
|
||||
new Column(GCMetricTable.COLUMN_ID, new NonOperation()),
|
||||
new Column(GCMetricTable.COLUMN_METRIC_ID, new NonOperation()),
|
||||
};
|
||||
|
||||
private static final Column[] LONG_COLUMNS = {
|
||||
|
|
@ -50,8 +50,25 @@ public class GCMetric extends AbstractData {
|
|||
private static final Column[] BOOLEAN_COLUMNS = {};
|
||||
private static final Column[] BYTE_COLUMNS = {};
|
||||
|
||||
public GCMetric(String id) {
|
||||
super(id, STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
public GCMetric() {
|
||||
super(STRING_COLUMNS, LONG_COLUMNS, DOUBLE_COLUMNS, INTEGER_COLUMNS, BOOLEAN_COLUMNS, BYTE_COLUMNS);
|
||||
}
|
||||
|
||||
@Override public String getId() {
|
||||
return getDataString(0);
|
||||
}
|
||||
|
||||
@Override public void setId(String id) {
|
||||
setDataString(0, id);
|
||||
}
|
||||
|
||||
@Override public String getMetricId() {
|
||||
return getDataString(1);
|
||||
}
|
||||
|
||||
@Override public void setMetricId(String metricId) {
|
||||
setDataString(1, metricId);
|
||||
|
||||
}
|
||||
|
||||
public Long getCount() {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponent
|
|||
import org.apache.skywalking.apm.collector.storage.dao.ampp.IApplicationMappingMinutePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.armp.IApplicationReferenceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO;
|
||||
|
||||
|
|
@ -78,7 +79,7 @@ public class DataTTLKeeperTimer {
|
|||
ICpuSecondMetricPersistenceDAO cpuMetricPersistenceDAO = moduleManager.find(StorageModule.NAME).getService(ICpuSecondMetricPersistenceDAO.class);
|
||||
cpuMetricPersistenceDAO.deleteHistory(startTimestamp, endTimestamp);
|
||||
|
||||
IGCMetricPersistenceDAO gcMetricPersistenceDAO = moduleManager.find(StorageModule.NAME).getService(IGCMetricPersistenceDAO.class);
|
||||
IGCSecondMetricPersistenceDAO gcMetricPersistenceDAO = moduleManager.find(StorageModule.NAME).getService(IGCSecondMetricPersistenceDAO.class);
|
||||
gcMetricPersistenceDAO.deleteHistory(startTimestamp, endTimestamp);
|
||||
|
||||
IMemoryMetricPersistenceDAO memoryMetricPersistenceDAO = moduleManager.find(StorageModule.NAME).getService(IMemoryMetricPersistenceDAO.class);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import org.apache.skywalking.apm.collector.storage.dao.IApplicationReferenceMetr
|
|||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationRegisterDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
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.IGlobalTraceUIDAO;
|
||||
|
|
@ -100,7 +100,7 @@ import org.apache.skywalking.apm.collector.storage.es.dao.armp.ApplicationRefere
|
|||
import org.apache.skywalking.apm.collector.storage.es.dao.ApplicationReferenceMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.cpump.CpuSecondMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.CpuMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.GCMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.gcmp.GCSecondMetricEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.GCMetricEsUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.GlobalTraceEsPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.dao.GlobalTraceEsUIDAO;
|
||||
|
|
@ -228,7 +228,7 @@ public class StorageModuleEsProvider extends ModuleProvider {
|
|||
|
||||
private void registerPersistenceDAO() throws ServiceNotProvidedException {
|
||||
this.registerServiceImplementation(ICpuSecondMetricPersistenceDAO.class, new CpuSecondMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IGCMetricPersistenceDAO.class, new GCMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IGCSecondMetricPersistenceDAO.class, new GCSecondMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IMemoryMetricPersistenceDAO.class, new MemoryMetricEsPersistenceDAO(elasticSearchClient));
|
||||
this.registerServiceImplementation(IMemoryPoolMetricPersistenceDAO.class, new MemoryPoolMetricEsPersistenceDAO(elasticSearchClient));
|
||||
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
* 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.dao;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient;
|
||||
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.es.base.dao.EsDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.update.UpdateRequestBuilder;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.index.reindex.BulkByScrollResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMetricEsPersistenceDAO extends EsDAO implements IGCMetricPersistenceDAO<IndexRequestBuilder, UpdateRequestBuilder, GCMetric> {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(GCMetricEsPersistenceDAO.class);
|
||||
|
||||
public GCMetricEsPersistenceDAO(ElasticSearchClient client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
@Override public GCMetric get(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public IndexRequestBuilder prepareBatchInsert(GCMetric gcMetric) {
|
||||
Map<String, Object> source = new HashMap<>();
|
||||
source.put(GCMetricTable.COLUMN_INSTANCE_ID, gcMetric.getInstanceId());
|
||||
source.put(GCMetricTable.COLUMN_PHRASE, gcMetric.getPhrase());
|
||||
source.put(GCMetricTable.COLUMN_COUNT, gcMetric.getCount());
|
||||
source.put(GCMetricTable.COLUMN_TIME, gcMetric.getTime());
|
||||
source.put(GCMetricTable.COLUMN_TIME_BUCKET, gcMetric.getTimeBucket());
|
||||
|
||||
return getClient().prepareIndex(GCMetricTable.TABLE, gcMetric.getId()).setSource(source);
|
||||
}
|
||||
|
||||
@Override public UpdateRequestBuilder prepareBatchUpdate(GCMetric gcMetric) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public void deleteHistory(Long startTimestamp, Long endTimestamp) {
|
||||
long startTimeBucket = TimeBucketUtils.INSTANCE.getSecondTimeBucket(startTimestamp);
|
||||
long endTimeBucket = TimeBucketUtils.INSTANCE.getSecondTimeBucket(endTimestamp);
|
||||
BulkByScrollResponse response = getClient().prepareDelete()
|
||||
.filter(QueryBuilders.rangeQuery(GCMetricTable.COLUMN_TIME_BUCKET).gte(startTimeBucket).lte(endTimeBucket))
|
||||
.source(GCMetricTable.TABLE)
|
||||
.get();
|
||||
|
||||
long deleted = response.getDeleted();
|
||||
logger.info("Delete {} rows history from {} index.", deleted, GCMetricTable.TABLE);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient;
|
||||
import org.apache.skywalking.apm.collector.storage.es.base.dao.AbstractPersistenceEsDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public abstract class AbstractGCMetricEsPersistenceDAO extends AbstractPersistenceEsDAO<GCMetric> {
|
||||
|
||||
AbstractGCMetricEsPersistenceDAO(ElasticSearchClient client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
@Override protected final String timeBucketColumnNameForDelete() {
|
||||
return GCMetricTable.COLUMN_TIME_BUCKET;
|
||||
}
|
||||
|
||||
@Override protected final GCMetric esDataToStreamData(Map<String, Object> source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override protected final Map<String, Object> esStreamDataToEsData(GCMetric streamData) {
|
||||
Map<String, Object> source = new HashMap<>();
|
||||
source.put(GCMetricTable.COLUMN_ID, streamData.getId());
|
||||
source.put(GCMetricTable.COLUMN_METRIC_ID, streamData.getMetricId());
|
||||
|
||||
source.put(GCMetricTable.COLUMN_INSTANCE_ID, streamData.getInstanceId());
|
||||
source.put(GCMetricTable.COLUMN_PHRASE, streamData.getPhrase());
|
||||
source.put(GCMetricTable.COLUMN_COUNT, streamData.getCount());
|
||||
source.put(GCMetricTable.COLUMN_TIME, streamData.getTime());
|
||||
source.put(GCMetricTable.COLUMN_TIME_BUCKET, streamData.getTimeBucket());
|
||||
|
||||
return source;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
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.gcmp.IGCDayMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.update.UpdateRequestBuilder;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCDayMetricEsPersistenceDAO extends AbstractGCMetricEsPersistenceDAO implements IGCDayMetricPersistenceDAO<IndexRequestBuilder, UpdateRequestBuilder, GCMetric> {
|
||||
|
||||
public GCDayMetricEsPersistenceDAO(ElasticSearchClient client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
@Override protected String tableName() {
|
||||
return GCMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Day.getName();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
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.gcmp.IGCHourMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.update.UpdateRequestBuilder;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCHourMetricEsPersistenceDAO extends AbstractGCMetricEsPersistenceDAO implements IGCHourMetricPersistenceDAO<IndexRequestBuilder, UpdateRequestBuilder, GCMetric> {
|
||||
|
||||
public GCHourMetricEsPersistenceDAO(ElasticSearchClient client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
@Override protected String tableName() {
|
||||
return GCMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Hour.getName();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
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.gcmp.IGCMinuteMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.update.UpdateRequestBuilder;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMinuteMetricEsPersistenceDAO extends AbstractGCMetricEsPersistenceDAO implements IGCMinuteMetricPersistenceDAO<IndexRequestBuilder, UpdateRequestBuilder, GCMetric> {
|
||||
|
||||
public GCMinuteMetricEsPersistenceDAO(ElasticSearchClient client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
@Override protected String tableName() {
|
||||
return GCMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Minute.getName();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
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.gcmp.IGCMonthMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.update.UpdateRequestBuilder;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMonthMetricEsPersistenceDAO extends AbstractGCMetricEsPersistenceDAO implements IGCMonthMetricPersistenceDAO<IndexRequestBuilder, UpdateRequestBuilder, GCMetric> {
|
||||
|
||||
public GCMonthMetricEsPersistenceDAO(ElasticSearchClient client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
@Override protected String tableName() {
|
||||
return GCMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Month.getName();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* 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.dao.gcmp;
|
||||
|
||||
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.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
import org.elasticsearch.action.index.IndexRequestBuilder;
|
||||
import org.elasticsearch.action.update.UpdateRequestBuilder;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCSecondMetricEsPersistenceDAO extends AbstractGCMetricEsPersistenceDAO implements IGCSecondMetricPersistenceDAO<IndexRequestBuilder, UpdateRequestBuilder, GCMetric> {
|
||||
|
||||
public GCSecondMetricEsPersistenceDAO(ElasticSearchClient client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
@Override protected String tableName() {
|
||||
return GCMetricTable.TABLE + Const.ID_SPLIT + TimePyramid.Second.getName();
|
||||
}
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@ import org.apache.skywalking.apm.collector.storage.dao.IApplicationReferenceMetr
|
|||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationRegisterDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricUIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
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.IGlobalTraceUIDAO;
|
||||
|
|
@ -96,7 +96,7 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.ApplicationReferenceMi
|
|||
import org.apache.skywalking.apm.collector.storage.h2.dao.ApplicationReferenceMetricH2UIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.dao.CpuSecondMetricH2PersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.dao.CpuMetricH2UIDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.dao.GCMetricH2PersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.h2.dao.GCSecondMetricH2PersistenceDAO;
|
||||
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.GlobalTraceH2UIDAO;
|
||||
|
|
@ -206,7 +206,7 @@ public class StorageModuleH2Provider extends ModuleProvider {
|
|||
|
||||
private void registerPersistenceDAO() throws ServiceNotProvidedException {
|
||||
this.registerServiceImplementation(ICpuSecondMetricPersistenceDAO.class, new CpuSecondMetricH2PersistenceDAO(h2Client));
|
||||
this.registerServiceImplementation(IGCMetricPersistenceDAO.class, new GCMetricH2PersistenceDAO(h2Client));
|
||||
this.registerServiceImplementation(IGCSecondMetricPersistenceDAO.class, new GCSecondMetricH2PersistenceDAO(h2Client));
|
||||
this.registerServiceImplementation(IMemoryMetricPersistenceDAO.class, new MemoryMetricH2PersistenceDAO(h2Client));
|
||||
this.registerServiceImplementation(IMemoryPoolMetricPersistenceDAO.class, new MemoryPoolMetricH2PersistenceDAO(h2Client));
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import java.util.Map;
|
|||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable;
|
||||
import org.apache.skywalking.apm.collector.client.h2.H2Client;
|
||||
import org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO;
|
||||
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.jvm.GCMetric;
|
||||
|
|
@ -32,9 +32,9 @@ import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
|||
/**
|
||||
* @author peng-yongsheng, clevertension
|
||||
*/
|
||||
public class GCMetricH2PersistenceDAO extends H2DAO implements IGCMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, GCMetric> {
|
||||
public class GCSecondMetricH2PersistenceDAO extends H2DAO implements IGCSecondMetricPersistenceDAO<H2SqlEntity, H2SqlEntity, GCMetric> {
|
||||
|
||||
public GCMetricH2PersistenceDAO(H2Client client) {
|
||||
public GCSecondMetricH2PersistenceDAO(H2Client client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue