Analysis JVM module finished.
This commit is contained in:
parent
e77043605b
commit
c037eef240
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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.
|
||||
~
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>analysis-jvm</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>5.0.0-alpha</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jvm-define</artifactId>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* 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.define;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IInstanceHeartBeatService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService;
|
||||
import org.apache.skywalking.apm.collector.core.module.Module;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class AnalysisJVMModule extends Module {
|
||||
|
||||
public static final String NAME = "analysis_jvm";
|
||||
|
||||
@Override public String name() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override public Class[] services() {
|
||||
return new Class[] {
|
||||
ICpuMetricService.class, IGCMetricService.class, IInstanceHeartBeatService.class,
|
||||
IMemoryMetricService.class, IMemoryPoolMetricService.class
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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.define.graph;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GraphIdDefine {
|
||||
public static final int CPU_METRIC_PERSISTENCE_GRAPH_ID = 300;
|
||||
public static final int GC_METRIC_PERSISTENCE_GRAPH_ID = 301;
|
||||
public static final int INSTANCE_HEART_BEAT_PERSISTENCE_GRAPH_ID = 302;
|
||||
public static final int MEMORY_METRIC_PERSISTENCE_GRAPH_ID = 303;
|
||||
public static final int MEMORY_POOL_METRIC_PERSISTENCE_GRAPH_ID = 304;
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* 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.define.graph;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class WorkerIdDefine {
|
||||
public static final int CPU_METRIC_PERSISTENCE_WORKER_ID = 300;
|
||||
public static final int GC_METRIC_PERSISTENCE_WORKER_ID = 301;
|
||||
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;
|
||||
}
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.service.jvm;
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.define.service;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.module.Service;
|
||||
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.service.jvm;
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.define.service;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.module.Service;
|
||||
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.service.jvm;
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.define.service;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.module.Service;
|
||||
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.service.jvm;
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.define.service;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.module.Service;
|
||||
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.service.jvm;
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.define.service;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.module.Service;
|
||||
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
|
||||
org.apache.skywalking.apm.collector.analysis.jvm.define.AnalysisJVMModule
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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.
|
||||
~
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>analysis-jvm</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>5.0.0-alpha</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jvm-provider</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>jvm-define</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>collector-storage-define</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<artifactId>analysis-worker-model</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.AnalysisJVMModule;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IInstanceHeartBeatService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.service.CpuMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.service.GCMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.service.InstanceHeartBeatService;
|
||||
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.CpuMetricPersistenceGraph;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.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;
|
||||
import org.apache.skywalking.apm.collector.core.module.Module;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleProvider;
|
||||
import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedException;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class AnalysisJVMModuleProvider extends ModuleProvider {
|
||||
|
||||
public static final String NAME = "default";
|
||||
|
||||
@Override public String name() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override public Class<? extends Module> module() {
|
||||
return AnalysisJVMModule.class;
|
||||
}
|
||||
|
||||
@Override public void prepare(Properties config) throws ServiceNotProvidedException {
|
||||
this.registerServiceImplementation(ICpuMetricService.class, new CpuMetricService());
|
||||
this.registerServiceImplementation(IGCMetricService.class, new GCMetricService());
|
||||
this.registerServiceImplementation(IInstanceHeartBeatService.class, new InstanceHeartBeatService());
|
||||
this.registerServiceImplementation(IMemoryMetricService.class, new MemoryMetricService());
|
||||
this.registerServiceImplementation(IMemoryPoolMetricService.class, new MemoryPoolMetricService());
|
||||
}
|
||||
|
||||
@Override public void start(Properties config) throws ServiceNotProvidedException {
|
||||
CpuMetricPersistenceGraph cpuMetricPersistenceGraph = new CpuMetricPersistenceGraph(getManager());
|
||||
cpuMetricPersistenceGraph.create();
|
||||
|
||||
GCMetricPersistenceGraph gcMetricPersistenceGraph = new GCMetricPersistenceGraph(getManager());
|
||||
gcMetricPersistenceGraph.create();
|
||||
|
||||
InstanceHeartBeatPersistenceGraph instanceHeartBeatPersistenceGraph = new InstanceHeartBeatPersistenceGraph(getManager());
|
||||
instanceHeartBeatPersistenceGraph.create();
|
||||
|
||||
MemoryMetricPersistenceGraph memoryMetricPersistenceGraph = new MemoryMetricPersistenceGraph(getManager());
|
||||
memoryMetricPersistenceGraph.create();
|
||||
|
||||
MemoryPoolMetricPersistenceGraph memoryPoolMetricPersistenceGraph = new MemoryPoolMetricPersistenceGraph(getManager());
|
||||
memoryPoolMetricPersistenceGraph.create();
|
||||
}
|
||||
|
||||
@Override public void notifyAfterCompleted() throws ServiceNotProvidedException {
|
||||
|
||||
}
|
||||
|
||||
@Override public String[] requiredModules() {
|
||||
return new String[0];
|
||||
}
|
||||
}
|
||||
|
|
@ -16,15 +16,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.service;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.graph.JvmMetricStreamGraphDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.ICpuMetricService;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Graph;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.core.util.ObjectUtils;
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.jvm.ICpuMetricService;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.CpuMetric;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -40,7 +39,7 @@ public class CpuMetricService implements ICpuMetricService {
|
|||
|
||||
private Graph<CpuMetric> getCpuMetricGraph() {
|
||||
if (ObjectUtils.isEmpty(cpuMetricGraph)) {
|
||||
cpuMetricGraph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.CPU_METRIC_GRAPH_ID, CpuMetric.class);
|
||||
cpuMetricGraph = GraphManager.INSTANCE.findGraph(GraphIdDefine.CPU_METRIC_PERSISTENCE_GRAPH_ID, CpuMetric.class);
|
||||
}
|
||||
return cpuMetricGraph;
|
||||
}
|
||||
|
|
@ -16,11 +16,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.service;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.graph.JvmMetricStreamGraphDefine;
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IGCMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IGCMetricService;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Graph;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
|
|
@ -40,7 +39,7 @@ public class GCMetricService implements IGCMetricService {
|
|||
|
||||
private Graph<GCMetric> getGcMetricGraph() {
|
||||
if (ObjectUtils.isEmpty(gcMetricGraph)) {
|
||||
gcMetricGraph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.GC_METRIC_GRAPH_ID, GCMetric.class);
|
||||
gcMetricGraph = GraphManager.INSTANCE.findGraph(GraphIdDefine.GC_METRIC_PERSISTENCE_GRAPH_ID, GCMetric.class);
|
||||
}
|
||||
return gcMetricGraph;
|
||||
}
|
||||
|
|
@ -16,16 +16,15 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.service;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.graph.JvmMetricStreamGraphDefine;
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IInstanceHeartBeatService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IInstanceHeartBeatService;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Graph;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.util.ObjectUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
|
||||
import org.apache.skywalking.apm.collector.core.util.TimeBucketUtils;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
|
@ -40,7 +39,7 @@ public class InstanceHeartBeatService implements IInstanceHeartBeatService {
|
|||
|
||||
private Graph<Instance> getHeartBeatGraph() {
|
||||
if (ObjectUtils.isEmpty(heartBeatGraph)) {
|
||||
this.heartBeatGraph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.INST_HEART_BEAT_GRAPH_ID, Instance.class);
|
||||
this.heartBeatGraph = GraphManager.INSTANCE.findGraph(GraphIdDefine.INSTANCE_HEART_BEAT_PERSISTENCE_GRAPH_ID, Instance.class);
|
||||
}
|
||||
return heartBeatGraph;
|
||||
}
|
||||
|
|
@ -16,15 +16,14 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.service;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryMetricService;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Graph;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
import org.apache.skywalking.apm.collector.core.util.ObjectUtils;
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.graph.JvmMetricStreamGraphDefine;
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IMemoryMetricService;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Graph;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryMetric;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
@ -40,7 +39,7 @@ public class MemoryMetricService implements IMemoryMetricService {
|
|||
|
||||
private Graph<MemoryMetric> getMemoryMetricGraph() {
|
||||
if (ObjectUtils.isEmpty(memoryMetricGraph)) {
|
||||
this.memoryMetricGraph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.MEMORY_METRIC_GRAPH_ID, MemoryMetric.class);
|
||||
this.memoryMetricGraph = GraphManager.INSTANCE.findGraph(GraphIdDefine.MEMORY_METRIC_PERSISTENCE_GRAPH_ID, MemoryMetric.class);
|
||||
}
|
||||
return memoryMetricGraph;
|
||||
}
|
||||
|
|
@ -16,11 +16,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.service;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.graph.JvmMetricStreamGraphDefine;
|
||||
import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IMemoryPoolMetricService;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.service.IMemoryPoolMetricService;
|
||||
import org.apache.skywalking.apm.collector.core.graph.Graph;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.util.Const;
|
||||
|
|
@ -40,7 +39,7 @@ public class MemoryPoolMetricService implements IMemoryPoolMetricService {
|
|||
|
||||
private Graph<MemoryPoolMetric> getMemoryPoolMetricGraph() {
|
||||
if (ObjectUtils.isEmpty(memoryPoolMetricGraph)) {
|
||||
this.memoryPoolMetricGraph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.MEMORY_POOL_METRIC_GRAPH_ID, MemoryPoolMetric.class);
|
||||
this.memoryPoolMetricGraph = GraphManager.INSTANCE.findGraph(GraphIdDefine.MEMORY_POOL_METRIC_PERSISTENCE_GRAPH_ID, MemoryPoolMetric.class);
|
||||
}
|
||||
return memoryPoolMetricGraph;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.CpuMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class CpuMetricPersistenceGraph {
|
||||
|
||||
private final ModuleManager moduleManager;
|
||||
|
||||
public CpuMetricPersistenceGraph(ModuleManager moduleManager) {
|
||||
this.moduleManager = moduleManager;
|
||||
}
|
||||
|
||||
public void create() {
|
||||
GraphManager.INSTANCE.createIfAbsent(GraphIdDefine.CPU_METRIC_PERSISTENCE_GRAPH_ID, CpuMetric.class)
|
||||
.addNode(new CpuMetricPersistenceWorker.Factory(moduleManager).create(null));
|
||||
}
|
||||
}
|
||||
|
|
@ -16,17 +16,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.queue.service.QueueCreatorService;
|
||||
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.ICpuMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.CpuMetric;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
|
|
@ -38,7 +37,7 @@ public class CpuMetricPersistenceWorker extends PersistenceWorker<CpuMetric, Cpu
|
|||
}
|
||||
|
||||
@Override public int id() {
|
||||
return 115;
|
||||
return WorkerIdDefine.CPU_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
|
|
@ -51,8 +50,8 @@ public class CpuMetricPersistenceWorker extends PersistenceWorker<CpuMetric, Cpu
|
|||
|
||||
public static class Factory extends AbstractLocalAsyncWorkerProvider<CpuMetric, CpuMetric, CpuMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager, QueueCreatorService<CpuMetric> queueCreatorService) {
|
||||
super(moduleManager, queueCreatorService);
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public CpuMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class GCMetricPersistenceGraph {
|
||||
|
||||
private final ModuleManager moduleManager;
|
||||
|
||||
public GCMetricPersistenceGraph(ModuleManager moduleManager) {
|
||||
this.moduleManager = moduleManager;
|
||||
}
|
||||
|
||||
public void create() {
|
||||
GraphManager.INSTANCE.createIfAbsent(GraphIdDefine.GC_METRIC_PERSISTENCE_GRAPH_ID, GCMetric.class)
|
||||
.addNode(new GCMetricPersistenceWorker.Factory(moduleManager).create(null));
|
||||
}
|
||||
}
|
||||
|
|
@ -16,17 +16,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
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.table.jvm.GCMetric;
|
||||
import org.apache.skywalking.apm.collector.queue.service.QueueCreatorService;
|
||||
import org.apache.skywalking.apm.collector.storage.StorageModule;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
|
|
@ -38,7 +37,7 @@ public class GCMetricPersistenceWorker extends PersistenceWorker<GCMetric, GCMet
|
|||
}
|
||||
|
||||
@Override public int id() {
|
||||
return 112;
|
||||
return WorkerIdDefine.GC_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
|
|
@ -51,8 +50,8 @@ public class GCMetricPersistenceWorker extends PersistenceWorker<GCMetric, GCMet
|
|||
|
||||
public static class Factory extends AbstractLocalAsyncWorkerProvider<GCMetric, GCMetric, GCMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager, QueueCreatorService<GCMetric> queueCreatorService) {
|
||||
super(moduleManager, queueCreatorService);
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public GCMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
|
|
@ -16,17 +16,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
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.IInstanceHeartBeatPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
|
||||
import org.apache.skywalking.apm.collector.queue.service.QueueCreatorService;
|
||||
import org.apache.skywalking.apm.collector.storage.StorageModule;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
|
|
@ -38,7 +37,7 @@ public class InstHeartBeatPersistenceWorker extends PersistenceWorker<Instance,
|
|||
}
|
||||
|
||||
@Override public int id() {
|
||||
return 113;
|
||||
return WorkerIdDefine.INST_HEART_BEAT_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
|
|
@ -51,8 +50,8 @@ public class InstHeartBeatPersistenceWorker extends PersistenceWorker<Instance,
|
|||
|
||||
public static class Factory extends AbstractLocalAsyncWorkerProvider<Instance, Instance, InstHeartBeatPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager, QueueCreatorService<Instance> queueCreatorService) {
|
||||
super(moduleManager, queueCreatorService);
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public InstHeartBeatPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class InstanceHeartBeatPersistenceGraph {
|
||||
|
||||
private final ModuleManager moduleManager;
|
||||
|
||||
public InstanceHeartBeatPersistenceGraph(ModuleManager moduleManager) {
|
||||
this.moduleManager = moduleManager;
|
||||
}
|
||||
|
||||
public void create() {
|
||||
GraphManager.INSTANCE.createIfAbsent(GraphIdDefine.INSTANCE_HEART_BEAT_PERSISTENCE_GRAPH_ID, Instance.class)
|
||||
.addNode(new InstHeartBeatPersistenceWorker.Factory(moduleManager).create(null));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryMetricPersistenceGraph {
|
||||
|
||||
private final ModuleManager moduleManager;
|
||||
|
||||
public MemoryMetricPersistenceGraph(ModuleManager moduleManager) {
|
||||
this.moduleManager = moduleManager;
|
||||
}
|
||||
|
||||
public void create() {
|
||||
GraphManager.INSTANCE.createIfAbsent(GraphIdDefine.MEMORY_METRIC_PERSISTENCE_GRAPH_ID, MemoryMetric.class)
|
||||
.addNode(new MemoryMetricPersistenceWorker.Factory(moduleManager).create(null));
|
||||
}
|
||||
}
|
||||
|
|
@ -16,17 +16,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.queue.service.QueueCreatorService;
|
||||
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.IMemoryMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryMetric;
|
||||
import org.apache.skywalking.apm.collector.storage.StorageModule;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
|
|
@ -38,7 +37,7 @@ public class MemoryMetricPersistenceWorker extends PersistenceWorker<MemoryMetri
|
|||
}
|
||||
|
||||
@Override public int id() {
|
||||
return 119;
|
||||
return WorkerIdDefine.MEMORY_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
@Override protected boolean needMergeDBData() {
|
||||
|
|
@ -51,8 +50,8 @@ public class MemoryMetricPersistenceWorker extends PersistenceWorker<MemoryMetri
|
|||
|
||||
public static class Factory extends AbstractLocalAsyncWorkerProvider<MemoryMetric, MemoryMetric, MemoryMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager, QueueCreatorService<MemoryMetric> queueCreatorService) {
|
||||
super(moduleManager, queueCreatorService);
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public MemoryMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine;
|
||||
import org.apache.skywalking.apm.collector.core.graph.GraphManager;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class MemoryPoolMetricPersistenceGraph {
|
||||
|
||||
private final ModuleManager moduleManager;
|
||||
|
||||
public MemoryPoolMetricPersistenceGraph(ModuleManager moduleManager) {
|
||||
this.moduleManager = moduleManager;
|
||||
}
|
||||
|
||||
public void create() {
|
||||
GraphManager.INSTANCE.createIfAbsent(GraphIdDefine.MEMORY_POOL_METRIC_PERSISTENCE_GRAPH_ID, MemoryPoolMetric.class)
|
||||
.addNode(new MemoryPoolMetricPersistenceWorker.Factory(moduleManager).create(null));
|
||||
}
|
||||
}
|
||||
|
|
@ -16,17 +16,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
package org.apache.skywalking.apm.collector.analysis.jvm.provider.worker;
|
||||
|
||||
package org.apache.skywalking.apm.collector.agent.stream.worker.jvm;
|
||||
|
||||
import org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
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.IMemoryPoolMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric;
|
||||
import org.apache.skywalking.apm.collector.queue.service.QueueCreatorService;
|
||||
import org.apache.skywalking.apm.collector.storage.StorageModule;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.base.AbstractLocalAsyncWorkerProvider;
|
||||
import org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
|
|
@ -34,7 +33,7 @@ import org.apache.skywalking.apm.collector.analysis.worker.model.impl.Persistenc
|
|||
public class MemoryPoolMetricPersistenceWorker extends PersistenceWorker<MemoryPoolMetric, MemoryPoolMetric> {
|
||||
|
||||
@Override public int id() {
|
||||
return 122;
|
||||
return WorkerIdDefine.MEMORY_POOL_METRIC_PERSISTENCE_WORKER_ID;
|
||||
}
|
||||
|
||||
public MemoryPoolMetricPersistenceWorker(ModuleManager moduleManager) {
|
||||
|
|
@ -51,8 +50,8 @@ public class MemoryPoolMetricPersistenceWorker extends PersistenceWorker<MemoryP
|
|||
|
||||
public static class Factory extends AbstractLocalAsyncWorkerProvider<MemoryPoolMetric, MemoryPoolMetric, MemoryPoolMetricPersistenceWorker> {
|
||||
|
||||
public Factory(ModuleManager moduleManager, QueueCreatorService<MemoryPoolMetric> queueCreatorService) {
|
||||
super(moduleManager, queueCreatorService);
|
||||
public Factory(ModuleManager moduleManager) {
|
||||
super(moduleManager);
|
||||
}
|
||||
|
||||
@Override public MemoryPoolMetricPersistenceWorker workerInstance(ModuleManager moduleManager) {
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
|
||||
org.apache.skywalking.apm.collector.analysis.jvm.provider.AnalysisJVMModuleProvider
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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.
|
||||
~
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>apm-collector-analysis</artifactId>
|
||||
<groupId>org.apache.skywalking</groupId>
|
||||
<version>5.0.0-alpha</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>analysis-jvm</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<modules>
|
||||
<module>jvm-define</module>
|
||||
<module>jvm-provider</module>
|
||||
</modules>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
@ -36,6 +36,7 @@
|
|||
<module>analysis-worker-model</module>
|
||||
<module>analysis-metric</module>
|
||||
<module>analysis-register</module>
|
||||
<module>analysis-jvm</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
|
|
|
|||
Loading…
Reference in New Issue