diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/pom.xml b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/pom.xml deleted file mode 100644 index ef42077ff..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - apm-collector-agent-stream - org.apache.skywalking - 5.0.0-alpha - - 4.0.0 - - collector-agent-stream-define - jar - - - - org.apache.skywalking - apm-network - ${project.version} - - - diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamModule.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamModule.java deleted file mode 100644 index 35b2a4de6..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamModule.java +++ /dev/null @@ -1,69 +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.agent.stream; - -import java.util.ArrayList; -import java.util.List; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IGCMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IInstanceHeartBeatService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IMemoryMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IMemoryPoolMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.register.IInstanceIDService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.ICpuMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.register.IApplicationIDService; -import org.apache.skywalking.apm.collector.agent.stream.service.register.IServiceNameService; -import org.apache.skywalking.apm.collector.agent.stream.service.trace.ITraceSegmentService; -import org.apache.skywalking.apm.collector.core.module.Module; - -/** - * @author peng-yongsheng - */ -public class AgentStreamModule extends Module { - - public static final String NAME = "agent_stream"; - - @Override public String name() { - return NAME; - } - - @Override public Class[] services() { - List classes = new ArrayList<>(); - - addRegisterService(classes); - addJVMService(classes); - classes.add(ITraceSegmentService.class); - - return classes.toArray(new Class[] {}); - } - - private void addRegisterService(List classes) { - classes.add(IApplicationIDService.class); - classes.add(IInstanceIDService.class); - classes.add(IServiceNameService.class); - } - - private void addJVMService(List classes) { - classes.add(ICpuMetricService.class); - classes.add(IGCMetricService.class); - classes.add(IMemoryMetricService.class); - classes.add(IMemoryPoolMetricService.class); - classes.add(IInstanceHeartBeatService.class); - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/ApplicationGraphNodeIdDefine.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/ApplicationGraphNodeIdDefine.java deleted file mode 100644 index 5ab501128..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/ApplicationGraphNodeIdDefine.java +++ /dev/null @@ -1,29 +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.agent.stream.service.graph; - -/** - * @author peng-yongsheng - */ -public class ApplicationGraphNodeIdDefine { - public static final int APPLICATION_REFERENCE_METRIC_AGGREGATION_NODE_ID = 1001; - public static final int APPLICATION_REFERENCE_METRIC_REMOTE_NODE_ID = 1002; - public static final int APPLICATION_REFERENCE_METRIC_PERSISTENCE_NODE_ID = 1003; -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/InstanceGraphNodeIdDefine.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/InstanceGraphNodeIdDefine.java deleted file mode 100644 index cbfebcea4..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/InstanceGraphNodeIdDefine.java +++ /dev/null @@ -1,29 +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.agent.stream.service.graph; - -/** - * @author peng-yongsheng - */ -public class InstanceGraphNodeIdDefine { - public static final int INSTANCE_REFERENCE_METRIC_AGGREGATION_NODE_ID = 2001; - public static final int INSTANCE_REFERENCE_METRIC_REMOTE_NODE_ID = 2002; - public static final int INSTANCE_REFERENCE_METRIC_PERSISTENCE_NODE_ID = 2003; -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/JvmMetricStreamGraphDefine.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/JvmMetricStreamGraphDefine.java deleted file mode 100644 index d8bc4d0cf..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/JvmMetricStreamGraphDefine.java +++ /dev/null @@ -1,31 +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.agent.stream.service.graph; - -/** - * @author peng-yongsheng - */ -public class JvmMetricStreamGraphDefine { - public static final int GC_METRIC_GRAPH_ID = 100; - public static final int MEMORY_METRIC_GRAPH_ID = 101; - public static final int MEMORY_POOL_METRIC_GRAPH_ID = 102; - public static final int CPU_METRIC_GRAPH_ID = 103; - public static final int INST_HEART_BEAT_GRAPH_ID = 104; -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/RegisterStreamGraphDefine.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/RegisterStreamGraphDefine.java deleted file mode 100644 index 1650bec34..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/RegisterStreamGraphDefine.java +++ /dev/null @@ -1,29 +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.agent.stream.service.graph; - -/** - * @author peng-yongsheng - */ -public class RegisterStreamGraphDefine { - public static final int APPLICATION_REGISTER_GRAPH_ID = 200; - public static final int INSTANCE_REGISTER_GRAPH_ID = 201; - public static final int SERVICE_NAME_REGISTER_GRAPH_ID = 202; -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/ServiceGraphNodeIdDefine.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/ServiceGraphNodeIdDefine.java deleted file mode 100644 index eeef0d011..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/graph/ServiceGraphNodeIdDefine.java +++ /dev/null @@ -1,29 +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.agent.stream.service.graph; - -/** - * @author peng-yongsheng - */ -public class ServiceGraphNodeIdDefine { - public static final int SERVICE_REFERENCE_METRIC_AGGREGATION_NODE_ID = 3001; - public static final int SERVICE_REFERENCE_METRIC_REMOTE_NODE_ID = 3002; - public static final int SERVICE_REFERENCE_METRIC_PERSISTENCE_NODE_ID = 3003; -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/trace/ITraceSegmentService.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/trace/ITraceSegmentService.java deleted file mode 100644 index 46c21db38..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/trace/ITraceSegmentService.java +++ /dev/null @@ -1,30 +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.agent.stream.service.trace; - -import org.apache.skywalking.apm.collector.core.module.Service; -import org.apache.skywalking.apm.network.proto.UpstreamSegment; - -/** - * @author peng-yongsheng - */ -public interface ITraceSegmentService extends Service { - void send(UpstreamSegment segment); -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module b/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module deleted file mode 100644 index af4001408..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module +++ /dev/null @@ -1,20 +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. -# -# - - -org.apache.skywalking.apm.collector.agent.stream.AgentStreamModule diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/pom.xml b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/pom.xml deleted file mode 100644 index 3cad2adf9..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/pom.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - apm-collector-agent-stream - org.apache.skywalking - 5.0.0-alpha - - 4.0.0 - - collector-agent-stream-provider - jar - - - - org.apache.skywalking - collector-agent-stream-define - ${project.version} - - - org.apache.skywalking - collector-storage-define - ${project.version} - - - org.apache.skywalking - collector-cache-define - ${project.version} - - - org.apache.skywalking - collector-configuration-define - ${project.version} - - - org.apache.skywalking - apm-collector-stream - ${project.version} - - - diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamBootStartup.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamBootStartup.java deleted file mode 100644 index 3399e2d82..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamBootStartup.java +++ /dev/null @@ -1,81 +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.agent.stream; - -import org.apache.skywalking.apm.collector.agent.stream.graph.JvmMetricStreamGraph; -import org.apache.skywalking.apm.collector.agent.stream.graph.RegisterStreamGraph; -import org.apache.skywalking.apm.collector.agent.stream.graph.TraceStreamGraph; -import org.apache.skywalking.apm.collector.core.module.ModuleManager; -import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener; -import org.apache.skywalking.apm.collector.stream.timer.PersistenceTimer; - -/** - * @author peng-yongsheng - */ -public class AgentStreamBootStartup { - - private final ModuleManager moduleManager; - private final WorkerCreateListener workerCreateListener; - - public AgentStreamBootStartup(ModuleManager moduleManager) { - this.moduleManager = moduleManager; - this.workerCreateListener = new WorkerCreateListener(); - } - - public void start() { - createJVMGraph(); - createRegisterGraph(); - createTraceGraph(); - - PersistenceTimer timer = new PersistenceTimer(); - timer.start(moduleManager, workerCreateListener.getPersistenceWorkers()); - } - - private void createJVMGraph() { - JvmMetricStreamGraph jvmMetricStreamGraph = new JvmMetricStreamGraph(moduleManager, workerCreateListener); - jvmMetricStreamGraph.createCpuMetricGraph(); - jvmMetricStreamGraph.createGcMetricGraph(); - jvmMetricStreamGraph.createMemoryMetricGraph(); - jvmMetricStreamGraph.createMemoryPoolMetricGraph(); - jvmMetricStreamGraph.createHeartBeatGraph(); - } - - private void createRegisterGraph() { - RegisterStreamGraph registerStreamGraph = new RegisterStreamGraph(moduleManager, workerCreateListener); - registerStreamGraph.createApplicationRegisterGraph(); - registerStreamGraph.createInstanceRegisterGraph(); - registerStreamGraph.createServiceNameRegisterGraph(); - } - - private void createTraceGraph() { - TraceStreamGraph traceStreamGraph = new TraceStreamGraph(moduleManager, workerCreateListener); - traceStreamGraph.createSegmentStandardizationGraph(); - traceStreamGraph.createGlobalTraceGraph(); - traceStreamGraph.createInstanceMetricGraph(); - traceStreamGraph.createApplicationComponentGraph(); - traceStreamGraph.createApplicationMappingGraph(); -// traceStreamGraph.createApplicationReferenceMetricGraph(); - traceStreamGraph.createServiceEntryGraph(); - traceStreamGraph.createSegmentGraph(); - traceStreamGraph.createSegmentCostGraph(); - - traceStreamGraph.createServiceReferenceGraph(); - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamModuleProvider.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamModuleProvider.java deleted file mode 100644 index 205f85afb..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/AgentStreamModuleProvider.java +++ /dev/null @@ -1,94 +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.agent.stream; - -import java.util.Properties; -import org.apache.skywalking.apm.collector.analysis.segment.parser.provider.buffer.BufferFileConfig; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IGCMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IInstanceHeartBeatService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IMemoryMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.IMemoryPoolMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.register.IApplicationIDService; -import org.apache.skywalking.apm.collector.agent.stream.service.register.IInstanceIDService; -import org.apache.skywalking.apm.collector.agent.stream.service.trace.ITraceSegmentService; -import org.apache.skywalking.apm.collector.agent.stream.worker.AgentStreamRemoteDataRegister; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.CpuMetricService; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.GCMetricService; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.InstanceHeartBeatService; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.MemoryMetricService; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.MemoryPoolMetricService; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.ApplicationIDService; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.InstanceIDService; -import org.apache.skywalking.apm.collector.agent.stream.worker.trace.TraceSegmentService; -import org.apache.skywalking.apm.collector.cache.CacheModule; -import org.apache.skywalking.apm.collector.core.module.ModuleProvider; -import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedException; -import org.apache.skywalking.apm.collector.remote.RemoteModule; -import org.apache.skywalking.apm.collector.remote.service.RemoteDataRegisterService; -import org.apache.skywalking.apm.collector.agent.stream.service.jvm.ICpuMetricService; -import org.apache.skywalking.apm.collector.agent.stream.service.register.IServiceNameService; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.ServiceNameService; -import org.apache.skywalking.apm.collector.configuration.ConfigurationModule; -import org.apache.skywalking.apm.collector.core.module.Module; -import org.apache.skywalking.apm.collector.storage.StorageModule; - -/** - * @author peng-yongsheng - */ -public class AgentStreamModuleProvider extends ModuleProvider { - - @Override public String name() { - return "default"; - } - - @Override public Class module() { - return AgentStreamModule.class; - } - - @Override public void prepare(Properties config) throws ServiceNotProvidedException { - this.registerServiceImplementation(ICpuMetricService.class, new CpuMetricService()); - this.registerServiceImplementation(IGCMetricService.class, new GCMetricService()); - this.registerServiceImplementation(IMemoryMetricService.class, new MemoryMetricService()); - this.registerServiceImplementation(IMemoryPoolMetricService.class, new MemoryPoolMetricService()); - this.registerServiceImplementation(IInstanceHeartBeatService.class, new InstanceHeartBeatService()); - - this.registerServiceImplementation(ITraceSegmentService.class, new TraceSegmentService(getManager())); - - BufferFileConfig.Parser parser = new BufferFileConfig.Parser(); - parser.parse(config); - } - - @Override public void start(Properties config) throws ServiceNotProvidedException { - RemoteDataRegisterService remoteDataRegisterService = getManager().find(RemoteModule.NAME).getService(RemoteDataRegisterService.class); - AgentStreamRemoteDataRegister agentStreamRemoteDataRegister = new AgentStreamRemoteDataRegister(remoteDataRegisterService); - agentStreamRemoteDataRegister.register(); - - AgentStreamBootStartup bootStartup = new AgentStreamBootStartup(getManager()); - bootStartup.start(); - } - - @Override public void notifyAfterCompleted() throws ServiceNotProvidedException { - - } - - @Override public String[] requiredModules() { - return new String[] {StorageModule.NAME, CacheModule.NAME, ConfigurationModule.NAME}; - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/GraphDefine.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/GraphDefine.java deleted file mode 100644 index ba6dd87a4..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/GraphDefine.java +++ /dev/null @@ -1,28 +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.agent.stream.graph; - -/** - * @author peng-yongsheng - */ -public interface GraphDefine { - - -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/JvmMetricStreamGraph.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/JvmMetricStreamGraph.java deleted file mode 100644 index 903c1ead3..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/JvmMetricStreamGraph.java +++ /dev/null @@ -1,92 +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.agent.stream.graph; - -import org.apache.skywalking.apm.collector.agent.stream.service.graph.JvmMetricStreamGraphDefine; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.CpuMetricPersistenceWorker; -import org.apache.skywalking.apm.collector.core.graph.Graph; -import org.apache.skywalking.apm.collector.core.graph.GraphManager; -import org.apache.skywalking.apm.collector.queue.QueueModule; -import org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric; -import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryMetric; -import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric; -import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.GCMetricPersistenceWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.InstHeartBeatPersistenceWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.MemoryMetricPersistenceWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.jvm.MemoryPoolMetricPersistenceWorker; -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.table.jvm.CpuMetric; -import org.apache.skywalking.apm.collector.storage.table.register.Instance; - -/** - * @author peng-yongsheng - */ -public class JvmMetricStreamGraph { - - private final ModuleManager moduleManager; - private final WorkerCreateListener workerCreateListener; - - public JvmMetricStreamGraph(ModuleManager moduleManager, WorkerCreateListener workerCreateListener) { - this.moduleManager = moduleManager; - this.workerCreateListener = workerCreateListener; - } - - @SuppressWarnings("unchecked") - public void createGcMetricGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.GC_METRIC_GRAPH_ID, GCMetric.class); - graph.addNode(new GCMetricPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createCpuMetricGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.CPU_METRIC_GRAPH_ID, CpuMetric.class); - graph.addNode(new CpuMetricPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createMemoryMetricGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.MEMORY_METRIC_GRAPH_ID, MemoryMetric.class); - graph.addNode(new MemoryMetricPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createMemoryPoolMetricGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.MEMORY_POOL_METRIC_GRAPH_ID, MemoryPoolMetric.class); - graph.addNode(new MemoryPoolMetricPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createHeartBeatGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(JvmMetricStreamGraphDefine.INST_HEART_BEAT_GRAPH_ID, Instance.class); - graph.addNode(new InstHeartBeatPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/RegisterStreamGraph.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/RegisterStreamGraph.java deleted file mode 100644 index 4b4c7bb03..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/RegisterStreamGraph.java +++ /dev/null @@ -1,86 +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.agent.stream.graph; - -import org.apache.skywalking.apm.collector.agent.stream.service.graph.RegisterStreamGraphDefine; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.ApplicationRegisterRemoteWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.ApplicationRegisterSerialWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.InstanceRegisterRemoteWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.InstanceRegisterSerialWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.ServiceNameRegisterRemoteWorker; -import org.apache.skywalking.apm.collector.agent.stream.worker.register.ServiceNameRegisterSerialWorker; -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.module.ModuleManager; -import org.apache.skywalking.apm.collector.queue.QueueModule; -import org.apache.skywalking.apm.collector.queue.service.QueueCreatorService; -import org.apache.skywalking.apm.collector.remote.RemoteModule; -import org.apache.skywalking.apm.collector.remote.service.RemoteSenderService; -import org.apache.skywalking.apm.collector.storage.table.register.Application; -import org.apache.skywalking.apm.collector.storage.table.register.Instance; -import org.apache.skywalking.apm.collector.storage.table.register.ServiceName; -import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener; - -/** - * @author peng-yongsheng - */ -public class RegisterStreamGraph { - - private final ModuleManager moduleManager; - private final WorkerCreateListener workerCreateListener; - - public RegisterStreamGraph(ModuleManager moduleManager, WorkerCreateListener workerCreateListener) { - this.moduleManager = moduleManager; - this.workerCreateListener = workerCreateListener; - } - - @SuppressWarnings("unchecked") - public void createApplicationRegisterGraph() { - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.APPLICATION_REGISTER_GRAPH_ID, Application.class); - graph.addNode(new ApplicationRegisterRemoteWorker.Factory(moduleManager, remoteSenderService, RegisterStreamGraphDefine.APPLICATION_REGISTER_GRAPH_ID).create(workerCreateListener)) - .addNext(new ApplicationRegisterSerialWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createInstanceRegisterGraph() { - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.INSTANCE_REGISTER_GRAPH_ID, Instance.class); - graph.addNode(new InstanceRegisterRemoteWorker.Factory(moduleManager, remoteSenderService, RegisterStreamGraphDefine.INSTANCE_REGISTER_GRAPH_ID).create(workerCreateListener)) - .addNext(new InstanceRegisterSerialWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createServiceNameRegisterGraph() { - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.SERVICE_NAME_REGISTER_GRAPH_ID, ServiceName.class); - graph.addNode(new ServiceNameRegisterRemoteWorker.Factory(moduleManager, remoteSenderService, RegisterStreamGraphDefine.SERVICE_NAME_REGISTER_GRAPH_ID).create(workerCreateListener)) - .addNext(new ServiceNameRegisterSerialWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/TraceStreamGraph.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/TraceStreamGraph.java deleted file mode 100644 index 29118d530..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/graph/TraceStreamGraph.java +++ /dev/null @@ -1,191 +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.agent.stream.graph; - -import org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SegmentStandardizationWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.application.ApplicationComponentPersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.application.ApplicationComponentRemoteWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.application.ApplicationMappingAggregationWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.segment.SegmentPersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.ServiceEntryRemoteWorker; -import org.apache.skywalking.apm.collector.core.graph.Graph; -import org.apache.skywalking.apm.collector.core.graph.GraphManager; -import org.apache.skywalking.apm.collector.queue.QueueModule; -import org.apache.skywalking.apm.collector.remote.service.RemoteSenderService; -import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping; -import org.apache.skywalking.apm.collector.storage.table.instance.InstanceMetric; -import org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener; -import org.apache.skywalking.apm.collector.agent.stream.parser.standardization.SegmentStandardization; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.application.ApplicationComponentAggregationWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.application.ApplicationMappingPersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.application.ApplicationMappingRemoteWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.global.GlobalTracePersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.instance.InstanceMetricPersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.segment.SegmentCostPersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.ServiceEntryAggregationWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.ServiceEntryPersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.ServiceReferenceMetricAggregationWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.ServiceReferenceMetricPersistenceWorker; -import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.ServiceReferenceMetricRemoteWorker; -import org.apache.skywalking.apm.collector.core.module.ModuleManager; -import org.apache.skywalking.apm.collector.queue.service.QueueCreatorService; -import org.apache.skywalking.apm.collector.remote.RemoteModule; -import org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent; -import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric; -import org.apache.skywalking.apm.collector.storage.table.global.GlobalTrace; -import org.apache.skywalking.apm.collector.storage.table.instance.InstanceReferenceMetric; -import org.apache.skywalking.apm.collector.storage.table.segment.Segment; -import org.apache.skywalking.apm.collector.storage.table.segment.SegmentCost; -import org.apache.skywalking.apm.collector.storage.table.service.ServiceEntry; -import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric; - -/** - * @author peng-yongsheng - */ -public class TraceStreamGraph { - public static final int GLOBAL_TRACE_GRAPH_ID = 300; - public static final int INSTANCE_METRIC_GRAPH_ID = 301; - public static final int APPLICATION_COMPONENT_GRAPH_ID = 302; - public static final int APPLICATION_MAPPING_GRAPH_ID = 303; - public static final int SERVICE_ENTRY_GRAPH_ID = 305; - public static final int SERVICE_REFERENCE_GRAPH_ID = 306; - public static final int SEGMENT_GRAPH_ID = 307; - public static final int SEGMENT_COST_GRAPH_ID = 308; - public static final int SEGMENT_STANDARDIZATION_GRAPH_ID = 309; - - private final ModuleManager moduleManager; - private final WorkerCreateListener workerCreateListener; - - public TraceStreamGraph(ModuleManager moduleManager, WorkerCreateListener workerCreateListener) { - this.moduleManager = moduleManager; - this.workerCreateListener = workerCreateListener; - } - - @SuppressWarnings("unchecked") - public void createSegmentStandardizationGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(SEGMENT_STANDARDIZATION_GRAPH_ID, SegmentStandardization.class); - graph.addNode(new SegmentStandardizationWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createGlobalTraceGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(GLOBAL_TRACE_GRAPH_ID, GlobalTrace.class); - graph.addNode(new GlobalTracePersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createInstanceMetricGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(INSTANCE_METRIC_GRAPH_ID, InstanceMetric.class); - graph.addNode(new InstanceMetricPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createApplicationComponentGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(APPLICATION_COMPONENT_GRAPH_ID, ApplicationComponent.class); - graph.addNode(new ApplicationComponentAggregationWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)) - .addNext(new ApplicationComponentRemoteWorker.Factory(moduleManager, remoteSenderService, APPLICATION_COMPONENT_GRAPH_ID).create(workerCreateListener)) - .addNext(new ApplicationComponentPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createApplicationMappingGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(APPLICATION_MAPPING_GRAPH_ID, ApplicationMapping.class); - graph.addNode(new ApplicationMappingAggregationWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)) - .addNext(new ApplicationMappingRemoteWorker.Factory(moduleManager, remoteSenderService, APPLICATION_MAPPING_GRAPH_ID).create(workerCreateListener)) - .addNext(new ApplicationMappingPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createServiceEntryGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(SERVICE_ENTRY_GRAPH_ID, ServiceEntry.class); - graph.addNode(new ServiceEntryAggregationWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)) - .addNext(new ServiceEntryRemoteWorker.Factory(moduleManager, remoteSenderService, SERVICE_ENTRY_GRAPH_ID).create(workerCreateListener)) - .addNext(new ServiceEntryPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createServiceReferenceGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(SERVICE_REFERENCE_GRAPH_ID, ServiceReferenceMetric.class); - graph.addNode(new ServiceReferenceMetricAggregationWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)) - .addNext(new ServiceReferenceMetricRemoteWorker.Factory(moduleManager, remoteSenderService, SERVICE_REFERENCE_GRAPH_ID).create(workerCreateListener)) - .addNext(new ServiceReferenceMetricPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - - createInstanceReferenceGraph(graph); - } - - @SuppressWarnings("unchecked") - private void createInstanceReferenceGraph(Graph graph) { - QueueCreatorService aggregationQueueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - QueueCreatorService persistenceQueueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - -// Node serviceReferenceMetricNode = graph.toFinder().findNode(ServiceGraphNodeIdDefine.SERVICE_REFERENCE_METRIC_AGGREGATION_NODE_ID, ServiceReferenceMetric.class); -// serviceReferenceMetricNode.addNext(new InstanceReferenceMetricAggregationWorker.Factory(moduleManager, aggregationQueueCreatorService).create(workerCreateListener)) -// .addNext(new InstanceReferenceMetricRemoteWorker.Factory(moduleManager, remoteSenderService, SERVICE_REFERENCE_GRAPH_ID).create(workerCreateListener)) -// .addNext(new InstanceReferencePersistenceWorker.Factory(moduleManager, persistenceQueueCreatorService).create(workerCreateListener)); - - createApplicationReferenceMetricGraph(graph); - } - - @SuppressWarnings("unchecked") - private void createApplicationReferenceMetricGraph(Graph graph) { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - RemoteSenderService remoteSenderService = moduleManager.find(RemoteModule.NAME).getService(RemoteSenderService.class); - -// Node serviceReferenceMetricNode = graph.toFinder().findNode(ServiceGraphNodeIdDefine.SERVICE_REFERENCE_METRIC_AGGREGATION_NODE_ID, ServiceReferenceMetric.class); -// graph.addNode(new ApplicationReferenceMetricAggregationWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)) -// .addNext(new ApplicationReferenceMetricRemoteWorker.Factory(moduleManager, remoteSenderService, APPLICATION_REFERENCE_METRIC_GRAPH_ID).create(workerCreateListener)) -// .addNext(new ApplicationReferenceMetricPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createSegmentGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(SEGMENT_GRAPH_ID, Segment.class); - graph.addNode(new SegmentPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } - - @SuppressWarnings("unchecked") - public void createSegmentCostGraph() { - QueueCreatorService queueCreatorService = moduleManager.find(QueueModule.NAME).getService(QueueCreatorService.class); - - Graph graph = GraphManager.INSTANCE.createIfAbsent(SEGMENT_COST_GRAPH_ID, SegmentCost.class); - graph.addNode(new SegmentCostPersistenceWorker.Factory(moduleManager, queueCreatorService).create(workerCreateListener)); - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/AgentStreamRemoteDataRegister.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/AgentStreamRemoteDataRegister.java deleted file mode 100644 index 0ec13543b..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/AgentStreamRemoteDataRegister.java +++ /dev/null @@ -1,54 +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.agent.stream.worker; - -import org.apache.skywalking.apm.collector.remote.service.RemoteDataRegisterService; -import org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping; -import org.apache.skywalking.apm.collector.storage.table.register.Instance; -import org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent; -import org.apache.skywalking.apm.collector.storage.table.application.ApplicationReferenceMetric; -import org.apache.skywalking.apm.collector.storage.table.register.Application; -import org.apache.skywalking.apm.collector.storage.table.register.ServiceName; -import org.apache.skywalking.apm.collector.storage.table.service.ServiceEntry; -import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric; - -/** - * @author peng-yongsheng - */ -public class AgentStreamRemoteDataRegister { - - private final RemoteDataRegisterService remoteDataRegisterService; - - public AgentStreamRemoteDataRegister(RemoteDataRegisterService remoteDataRegisterService) { - this.remoteDataRegisterService = remoteDataRegisterService; - } - - public void register() { - remoteDataRegisterService.register(Application.class, Application::new); - remoteDataRegisterService.register(Instance.class, Instance::new); - remoteDataRegisterService.register(ServiceName.class, ServiceName::new); - - remoteDataRegisterService.register(ApplicationComponent.class, ApplicationComponent::new); - remoteDataRegisterService.register(ApplicationMapping.class, ApplicationMapping::new); - remoteDataRegisterService.register(ApplicationReferenceMetric.class, ApplicationReferenceMetric::new); - remoteDataRegisterService.register(ServiceEntry.class, ServiceEntry::new); - remoteDataRegisterService.register(ServiceReferenceMetric.class, ServiceReferenceMetric::new); - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/trace/TraceSegmentService.java b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/trace/TraceSegmentService.java deleted file mode 100644 index 753c70ad5..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/trace/TraceSegmentService.java +++ /dev/null @@ -1,42 +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.agent.stream.worker.trace; - -import org.apache.skywalking.apm.collector.agent.stream.parser.SegmentParse; -import org.apache.skywalking.apm.collector.agent.stream.service.trace.ITraceSegmentService; -import org.apache.skywalking.apm.collector.core.module.ModuleManager; -import org.apache.skywalking.apm.network.proto.UpstreamSegment; - -/** - * @author peng-yongsheng - */ -public class TraceSegmentService implements ITraceSegmentService { - - private final ModuleManager moduleManager; - - public TraceSegmentService(ModuleManager moduleManager) { - this.moduleManager = moduleManager; - } - - public void send(UpstreamSegment segment) { - SegmentParse segmentParse = new SegmentParse(moduleManager); - segmentParse.parse(segment, SegmentParse.Source.Agent); - } -} diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider b/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider deleted file mode 100644 index e63f393b9..000000000 --- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider +++ /dev/null @@ -1,20 +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. -# -# - - -org.apache.skywalking.apm.collector.agent.stream.AgentStreamModuleProvider diff --git a/apm-collector/apm-collector-agent-stream/pom.xml b/apm-collector/apm-collector-agent-stream/pom.xml deleted file mode 100644 index d671aa648..000000000 --- a/apm-collector/apm-collector-agent-stream/pom.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - apm-collector - org.apache.skywalking - 5.0.0-alpha - - 4.0.0 - - apm-collector-agent-stream - pom - - collector-agent-stream-define - collector-agent-stream-provider - - - - - org.apache.skywalking - apm-collector-core - ${project.version} - - - diff --git a/apm-collector/pom.xml b/apm-collector/pom.xml index 6282aa322..2389168c7 100644 --- a/apm-collector/pom.xml +++ b/apm-collector/pom.xml @@ -43,7 +43,6 @@ apm-collector-jetty-manager apm-collector-remote apm-collector-instrument - apm-collector-agent-stream apm-collector-configuration apm-collector-agent apm-collector-analysis