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
index 4a281f2dd..9577b7b14 100644
--- 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
@@ -63,10 +63,6 @@ public class AgentStreamModuleProvider extends ModuleProvider {
}
@Override public void prepare(Properties config) throws ServiceNotProvidedException {
- this.registerServiceImplementation(IApplicationIDService.class, new ApplicationIDService(getManager()));
- this.registerServiceImplementation(IInstanceIDService.class, new InstanceIDService(getManager()));
- this.registerServiceImplementation(IServiceNameService.class, new ServiceNameService(getManager()));
-
this.registerServiceImplementation(ICpuMetricService.class, new CpuMetricService());
this.registerServiceImplementation(IGCMetricService.class, new GCMetricService());
this.registerServiceImplementation(IMemoryMetricService.class, new MemoryMetricService());
diff --git a/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/pom.xml b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/pom.xml
new file mode 100644
index 000000000..bcc3a2acc
--- /dev/null
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/pom.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+ analysis-layer-register
+ org.apache.skywalking
+ 5.0.0-alpha
+
+ 4.0.0
+
+ layer-register-define
+ jar
+
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/AnalysisLayerRegisterModule.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/AnalysisLayerRegisterModule.java
new file mode 100644
index 000000000..a282bb308
--- /dev/null
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/AnalysisLayerRegisterModule.java
@@ -0,0 +1,40 @@
+/*
+ * 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.layer.register.define;
+
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IApplicationIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IInstanceIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IServiceNameService;
+import org.apache.skywalking.apm.collector.core.module.Module;
+
+/**
+ * @author peng-yongsheng
+ */
+public class AnalysisLayerRegisterModule extends Module {
+
+ public static final String NAME = "analysis_layer_register";
+
+ @Override public String name() {
+ return NAME;
+ }
+
+ @Override public Class[] services() {
+ return new Class[] {IApplicationIDService.class, IInstanceIDService.class, IServiceNameService.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/register/IApplicationIDService.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IApplicationIDService.java
similarity index 92%
rename from apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IApplicationIDService.java
rename to apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IApplicationIDService.java
index 48bdd5655..d6882cbb0 100644
--- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IApplicationIDService.java
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IApplicationIDService.java
@@ -17,7 +17,7 @@
*/
-package org.apache.skywalking.apm.collector.agent.stream.service.register;
+package org.apache.skywalking.apm.collector.analysis.layer.register.define.service;
import org.apache.skywalking.apm.collector.core.module.Service;
diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IInstanceIDService.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IInstanceIDService.java
similarity index 93%
rename from apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IInstanceIDService.java
rename to apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IInstanceIDService.java
index 8e9d17ab3..c25c5c4c6 100644
--- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IInstanceIDService.java
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IInstanceIDService.java
@@ -17,7 +17,7 @@
*/
-package org.apache.skywalking.apm.collector.agent.stream.service.register;
+package org.apache.skywalking.apm.collector.analysis.layer.register.define.service;
import org.apache.skywalking.apm.collector.core.module.Service;
diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IServiceNameService.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IServiceNameService.java
similarity index 92%
rename from apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IServiceNameService.java
rename to apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IServiceNameService.java
index fc6d1db7c..d7c2c2a5e 100644
--- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-define/src/main/java/org/apache/skywalking/apm/collector/agent/stream/service/register/IServiceNameService.java
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/define/service/IServiceNameService.java
@@ -17,7 +17,7 @@
*/
-package org.apache.skywalking.apm.collector.agent.stream.service.register;
+package org.apache.skywalking.apm.collector.analysis.layer.register.define.service;
import org.apache.skywalking.apm.collector.core.module.Service;
diff --git a/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module
new file mode 100644
index 000000000..5c8214837
--- /dev/null
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-define/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.Module
@@ -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.layer.register.define.AnalysisLayerRegisterModule
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/pom.xml b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/pom.xml
new file mode 100644
index 000000000..321d14595
--- /dev/null
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/pom.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+ analysis-layer-register
+ org.apache.skywalking
+ 5.0.0-alpha
+
+ 4.0.0
+
+ layer-register-provider
+ jar
+
+
+
+ org.apache.skywalking
+ layer-register-define
+ ${project.version}
+
+
+ org.apache.skywalking
+ collector-cache-define
+ ${project.version}
+
+
+
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/AnalysisLayerRegisterModuleProvider.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/AnalysisLayerRegisterModuleProvider.java
new file mode 100644
index 000000000..6468d8663
--- /dev/null
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/AnalysisLayerRegisterModuleProvider.java
@@ -0,0 +1,65 @@
+/*
+ * 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.layer.register.provider;
+
+import java.util.Properties;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.AnalysisLayerRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IApplicationIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IInstanceIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IServiceNameService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.provider.service.ApplicationIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.provider.service.InstanceIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.provider.service.ServiceNameService;
+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 AnalysisLayerRegisterModuleProvider extends ModuleProvider {
+
+ public static final String NAME = "default";
+
+ @Override public String name() {
+ return NAME;
+ }
+
+ @Override public Class extends Module> module() {
+ return AnalysisLayerRegisterModule.class;
+ }
+
+ @Override public void prepare(Properties config) throws ServiceNotProvidedException {
+ this.registerServiceImplementation(IApplicationIDService.class, new ApplicationIDService(getManager()));
+ this.registerServiceImplementation(IInstanceIDService.class, new InstanceIDService(getManager()));
+ this.registerServiceImplementation(IServiceNameService.class, new ServiceNameService(getManager()));
+ }
+
+ @Override public void start(Properties config) throws ServiceNotProvidedException {
+
+ }
+
+ @Override public void notifyAfterCompleted() throws ServiceNotProvidedException {
+
+ }
+
+ @Override public String[] requiredModules() {
+ return new String[0];
+ }
+}
diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/ApplicationIDService.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/ApplicationIDService.java
similarity index 84%
rename from apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/ApplicationIDService.java
rename to apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/ApplicationIDService.java
index c52b5b985..b16998c8c 100644
--- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/ApplicationIDService.java
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/ApplicationIDService.java
@@ -16,18 +16,15 @@
*
*/
+package org.apache.skywalking.apm.collector.analysis.layer.register.provider.service;
-package org.apache.skywalking.apm.collector.agent.stream.worker.register;
-
-import org.apache.skywalking.apm.collector.agent.stream.service.register.IApplicationIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IApplicationIDService;
import org.apache.skywalking.apm.collector.cache.CacheModule;
+import org.apache.skywalking.apm.collector.cache.service.ApplicationCacheService;
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.core.util.ObjectUtils;
import org.apache.skywalking.apm.collector.storage.table.register.Application;
-import org.apache.skywalking.apm.collector.agent.stream.service.graph.RegisterStreamGraphDefine;
-import org.apache.skywalking.apm.collector.cache.service.ApplicationCacheService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,7 +45,7 @@ public class ApplicationIDService implements IApplicationIDService {
private Graph getApplicationRegisterGraph() {
if (ObjectUtils.isEmpty(applicationRegisterGraph)) {
- this.applicationRegisterGraph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.APPLICATION_REGISTER_GRAPH_ID, Application.class);
+// this.applicationRegisterGraph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.APPLICATION_REGISTER_GRAPH_ID, Application.class);
}
return this.applicationRegisterGraph;
}
diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/InstanceIDService.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/InstanceIDService.java
similarity index 89%
rename from apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/InstanceIDService.java
rename to apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/InstanceIDService.java
index 600970965..ba010b0d1 100644
--- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/InstanceIDService.java
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/InstanceIDService.java
@@ -16,20 +16,17 @@
*
*/
+package org.apache.skywalking.apm.collector.analysis.layer.register.provider.service;
-package org.apache.skywalking.apm.collector.agent.stream.worker.register;
-
-import org.apache.skywalking.apm.collector.agent.stream.service.register.IInstanceIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IInstanceIDService;
import org.apache.skywalking.apm.collector.cache.CacheModule;
import org.apache.skywalking.apm.collector.cache.service.InstanceCacheService;
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.core.util.ObjectUtils;
+import org.apache.skywalking.apm.collector.storage.StorageModule;
import org.apache.skywalking.apm.collector.storage.dao.IInstanceRegisterDAO;
import org.apache.skywalking.apm.collector.storage.table.register.Instance;
-import org.apache.skywalking.apm.collector.agent.stream.service.graph.RegisterStreamGraphDefine;
-import org.apache.skywalking.apm.collector.storage.StorageModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,7 +55,7 @@ public class InstanceIDService implements IInstanceIDService {
private Graph getInstanceRegisterGraph() {
if (ObjectUtils.isEmpty(instanceRegisterGraph)) {
- this.instanceRegisterGraph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.INSTANCE_REGISTER_GRAPH_ID, Instance.class);
+// this.instanceRegisterGraph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.INSTANCE_REGISTER_GRAPH_ID, Instance.class);
}
return instanceRegisterGraph;
}
diff --git a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/ServiceNameService.java b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/ServiceNameService.java
similarity index 84%
rename from apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/ServiceNameService.java
rename to apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/ServiceNameService.java
index 39cacced9..bca414f36 100644
--- a/apm-collector/apm-collector-agent-stream/collector-agent-stream-provider/src/main/java/org/apache/skywalking/apm/collector/agent/stream/worker/register/ServiceNameService.java
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/layer/register/provider/service/ServiceNameService.java
@@ -16,17 +16,14 @@
*
*/
+package org.apache.skywalking.apm.collector.analysis.layer.register.provider.service;
-package org.apache.skywalking.apm.collector.agent.stream.worker.register;
-
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IServiceNameService;
import org.apache.skywalking.apm.collector.cache.CacheModule;
+import org.apache.skywalking.apm.collector.cache.service.ServiceIdCacheService;
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.core.util.ObjectUtils;
-import org.apache.skywalking.apm.collector.agent.stream.service.graph.RegisterStreamGraphDefine;
-import org.apache.skywalking.apm.collector.agent.stream.service.register.IServiceNameService;
-import org.apache.skywalking.apm.collector.cache.service.ServiceIdCacheService;
import org.apache.skywalking.apm.collector.storage.table.register.ServiceName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,7 +52,7 @@ public class ServiceNameService implements IServiceNameService {
private Graph getServiceNameRegisterGraph() {
if (ObjectUtils.isEmpty(serviceNameRegisterGraph)) {
- this.serviceNameRegisterGraph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.SERVICE_NAME_REGISTER_GRAPH_ID, ServiceName.class);
+// this.serviceNameRegisterGraph = GraphManager.INSTANCE.createIfAbsent(RegisterStreamGraphDefine.SERVICE_NAME_REGISTER_GRAPH_ID, ServiceName.class);
}
return serviceNameRegisterGraph;
}
diff --git a/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
new file mode 100644
index 000000000..c5b05474b
--- /dev/null
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/layer-register-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
@@ -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.layer.register.provider.AnalysisLayerRegisterModuleProvider
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-layer-register/pom.xml b/apm-collector/apm-collector-analysis/analysis-layer-register/pom.xml
new file mode 100644
index 000000000..354ddfae4
--- /dev/null
+++ b/apm-collector/apm-collector-analysis/analysis-layer-register/pom.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+ apm-collector-analysis
+ org.apache.skywalking
+ 5.0.0-alpha
+
+ 4.0.0
+
+ analysis-layer-register
+ pom
+
+ layer-register-define
+ layer-register-provider
+
+
+
+
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/pom.xml b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/pom.xml
index e987c1abf..9eef1371c 100644
--- a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/pom.xml
+++ b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/pom.xml
@@ -36,5 +36,15 @@
segment-parser-define
${project.version}
+
+ org.apache.skywalking
+ layer-register-define
+ ${project.version}
+
+
+ org.apache.skywalking
+ collector-cache-define
+ ${project.version}
+
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisTraceParseModuleProvider.java b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisSegmentParserModuleProvider.java
similarity index 97%
rename from apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisTraceParseModuleProvider.java
rename to apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisSegmentParserModuleProvider.java
index f47ca2179..1ea256faa 100644
--- a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisTraceParseModuleProvider.java
+++ b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/AnalysisSegmentParserModuleProvider.java
@@ -32,7 +32,7 @@ import org.apache.skywalking.apm.collector.core.module.ServiceNotProvidedExcepti
/**
* @author peng-yongsheng
*/
-public class AnalysisTraceParseModuleProvider extends ModuleProvider {
+public class AnalysisSegmentParserModuleProvider extends ModuleProvider {
public static final String NAME = "default";
private SegmentParserListenerManager listenerManager;
diff --git a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/ReferenceIdExchanger.java b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/ReferenceIdExchanger.java
index 2fbfcf121..975c78071 100644
--- a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/ReferenceIdExchanger.java
+++ b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/ReferenceIdExchanger.java
@@ -16,16 +16,16 @@
*
*/
-
package org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.AnalysisLayerRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IApplicationIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IServiceNameService;
import org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.ReferenceDecorator;
-import org.apache.skywalking.apm.collector.core.util.Const;
-import org.apache.skywalking.apm.collector.agent.stream.worker.register.ApplicationIDService;
-import org.apache.skywalking.apm.collector.agent.stream.worker.register.ServiceNameService;
import org.apache.skywalking.apm.collector.cache.CacheModule;
import org.apache.skywalking.apm.collector.cache.service.InstanceCacheService;
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
+import org.apache.skywalking.apm.collector.core.util.Const;
import org.apache.skywalking.apm.collector.core.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -38,8 +38,8 @@ public class ReferenceIdExchanger implements IdExchanger {
private final Logger logger = LoggerFactory.getLogger(ReferenceIdExchanger.class);
private static ReferenceIdExchanger EXCHANGER;
- private final ServiceNameService serviceNameService;
- private final ApplicationIDService applicationIDService;
+ private final IApplicationIDService applicationIDService;
+ private final IServiceNameService serviceNameService;
private final InstanceCacheService instanceCacheService;
public static ReferenceIdExchanger getInstance(ModuleManager moduleManager) {
@@ -50,8 +50,8 @@ public class ReferenceIdExchanger implements IdExchanger {
}
private ReferenceIdExchanger(ModuleManager moduleManager) {
- applicationIDService = new ApplicationIDService(moduleManager);
- serviceNameService = new ServiceNameService(moduleManager);
+ applicationIDService = moduleManager.find(AnalysisLayerRegisterModule.NAME).getService(IApplicationIDService.class);
+ serviceNameService = moduleManager.find(AnalysisLayerRegisterModule.NAME).getService(IServiceNameService.class);
instanceCacheService = moduleManager.find(CacheModule.NAME).getService(InstanceCacheService.class);
}
diff --git a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/SpanIdExchanger.java b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/SpanIdExchanger.java
index 876c58f81..fcf9e0457 100644
--- a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/SpanIdExchanger.java
+++ b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/segment/parser/provider/parser/standardization/SpanIdExchanger.java
@@ -18,8 +18,9 @@
package org.apache.skywalking.apm.collector.analysis.segment.parser.provider.parser.standardization;
-import org.apache.skywalking.apm.collector.agent.stream.worker.register.ApplicationIDService;
-import org.apache.skywalking.apm.collector.agent.stream.worker.register.ServiceNameService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.AnalysisLayerRegisterModule;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IApplicationIDService;
+import org.apache.skywalking.apm.collector.analysis.layer.register.define.service.IServiceNameService;
import org.apache.skywalking.apm.collector.analysis.segment.parser.define.decorator.SpanDecorator;
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
import org.apache.skywalking.apm.collector.core.util.Const;
@@ -35,8 +36,8 @@ public class SpanIdExchanger implements IdExchanger {
private final Logger logger = LoggerFactory.getLogger(SpanIdExchanger.class);
private static SpanIdExchanger EXCHANGER;
- private final ApplicationIDService applicationIDService;
- private final ServiceNameService serviceNameService;
+ private final IApplicationIDService applicationIDService;
+ private final IServiceNameService serviceNameService;
public static SpanIdExchanger getInstance(ModuleManager moduleManager) {
if (EXCHANGER == null) {
@@ -46,8 +47,8 @@ public class SpanIdExchanger implements IdExchanger {
}
private SpanIdExchanger(ModuleManager moduleManager) {
- this.applicationIDService = new ApplicationIDService(moduleManager);
- this.serviceNameService = new ServiceNameService(moduleManager);
+ applicationIDService = moduleManager.find(AnalysisLayerRegisterModule.NAME).getService(IApplicationIDService.class);
+ serviceNameService = moduleManager.find(AnalysisLayerRegisterModule.NAME).getService(IServiceNameService.class);
}
@Override public boolean exchange(SpanDecorator standardBuilder, int applicationId) {
diff --git a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
index d33d1248f..f2e4fa183 100644
--- a/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
+++ b/apm-collector/apm-collector-analysis/analysis-segment-parser/segment-parser-provider/src/main/resources/META-INF/services/org.apache.skywalking.apm.collector.core.module.ModuleProvider
@@ -16,22 +16,4 @@
#
#
-#
-# 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.segment.parser.provider.AnalysisTraceParseModuleProvider
\ No newline at end of file
+org.apache.skywalking.apm.collector.analysis.segment.parser.provider.AnalysisSegmentParserModuleProvider
\ No newline at end of file
diff --git a/apm-collector/apm-collector-analysis/pom.xml b/apm-collector/apm-collector-analysis/pom.xml
index cfab3c96e..3ca85beb9 100644
--- a/apm-collector/apm-collector-analysis/pom.xml
+++ b/apm-collector/apm-collector-analysis/pom.xml
@@ -31,6 +31,7 @@
pom
analysis-segment-parser
+ analysis-layer-register