1.4.196
+ 2.0.3
+ 1.4
+ 6.3.1
@@ -74,6 +83,10 @@
com.google.guavaguava
+
+ org.projectlombok
+ lombok
+
@@ -108,6 +121,11 @@
gson${gson.version}
+
+ com.h2database
+ h2
+ ${h2.version}
+ joda-timejoda-time
@@ -115,42 +133,8 @@
org.elasticsearch.client
- transport
- ${elasticsearch.client.version}
-
-
- snakeyaml
- org.yaml
-
-
- netty-common
- io.netty
-
-
- netty-transport
- io.netty
-
-
- netty-codec
- io.netty
-
-
- netty-codec-http
- io.netty
-
-
- netty-buffer
- io.netty
-
-
- netty-handler
- io.netty
-
-
- netty-resolver
- io.netty
-
-
+ elasticsearch-rest-client
+ ${elasticsearch.version}org.apache.zookeeper
@@ -188,6 +172,58 @@
+
+ io.grpc
+ grpc-core
+ ${grpc.version}
+
+
+ io.grpc
+ grpc-netty
+ ${grpc.version}
+
+
+ io.grpc
+ grpc-protobuf
+ ${grpc.version}
+
+
+ io.grpc
+ grpc-stub
+ ${grpc.version}
+
+
+ io.grpc
+ grpc-testing
+ ${grpc.version}
+ test
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${jetty.version}
+
+
+ org.eclipse.jetty
+ jetty-servlet
+ ${jetty.version}
+
+
+ org.projectlombok
+ lombok
+ ${lombok.version}
+ provided
+
+
+ io.shardingjdbc
+ sharding-jdbc-core
+ ${shardingjdbc.version}
+
+
+ commons-dbcp
+ commons-dbcp
+ ${commons-dbcp.version}
+
\ No newline at end of file
diff --git a/oap-server/server-cluster-plugin/cluster-standalone-plugin/pom.xml b/oap-server/server-cluster-plugin/cluster-standalone-plugin/pom.xml
index 743028f8c9f84e125ebd285c3565334bd67c371c..c1269ae81408feb670f7343b044056d905a3381e 100644
--- a/oap-server/server-cluster-plugin/cluster-standalone-plugin/pom.xml
+++ b/oap-server/server-cluster-plugin/cluster-standalone-plugin/pom.xml
@@ -33,7 +33,7 @@
org.apache.skywalking
- core-cluster
+ server-core${project.version}
diff --git a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml
index 0fab89c844fb962e2deb8df56ff5faa16f325ca0..0ba6843d052f74fc28239b8b87963c961a97c4b8 100644
--- a/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml
+++ b/oap-server/server-cluster-plugin/cluster-zookeeper-plugin/pom.xml
@@ -38,7 +38,7 @@
org.apache.skywalking
- core-cluster
+ server-core${project.version}
diff --git a/oap-server/server-core/pom.xml b/oap-server/server-core/pom.xml
index 37ad39cc4ffaeec256b988fc9c92358833c90b69..767e1c8bd7605310ac99b877f0939b60843e83b3 100644
--- a/oap-server/server-core/pom.xml
+++ b/oap-server/server-core/pom.xml
@@ -28,10 +28,7 @@
4.0.0server-core
- pom
-
- core-cluster
-
+ jar
@@ -44,5 +41,20 @@
library-util${project.version}
+
+ org.apache.skywalking
+ library-server
+ ${project.version}
+
+
+ org.apache.skywalking
+ apm-network
+ ${project.version}
+
+
+ org.apache.skywalking
+ apm-datacarrier
+ ${project.version}
+
\ No newline at end of file
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModule.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModule.java
new file mode 100644
index 0000000000000000000000000000000000000000..6f3de4875394e025d3a4f646e06aa7bde333e36f
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModule.java
@@ -0,0 +1,53 @@
+/*
+ * 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.oap.server.core;
+
+import java.util.*;
+import org.apache.skywalking.oap.server.core.receiver.SourceReceiver;
+import org.apache.skywalking.oap.server.core.server.*;
+import org.apache.skywalking.oap.server.library.module.ModuleDefine;
+
+/**
+ * @author peng-yongsheng
+ */
+public class CoreModule extends ModuleDefine {
+
+ public static final String NAME = "core";
+
+ @Override public String name() {
+ return NAME;
+ }
+
+ @Override public Class[] services() {
+ List classes = new ArrayList<>();
+ addServerInterface(classes);
+ addReceiverInterface(classes);
+
+ return classes.toArray(new Class[] {});
+ }
+
+ private void addServerInterface(List classes) {
+ classes.add(GRPCHandlerRegister.class);
+ classes.add(JettyHandlerRegister.class);
+ }
+
+ private void addReceiverInterface(List classes) {
+ classes.add(SourceReceiver.class);
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..f781a8c460f8251dbbb3f3f5a8dbeaecc61ceb41
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleConfig.java
@@ -0,0 +1,33 @@
+/*
+ * 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.oap.server.core;
+
+import lombok.*;
+import org.apache.skywalking.oap.server.library.module.ModuleConfig;
+
+/**
+ * @author peng-yongsheng
+ */
+public class CoreModuleConfig extends ModuleConfig {
+ @Setter @Getter private String restHost;
+ @Setter @Getter private int restPort;
+ @Setter @Getter private String restContextPath;
+ @Setter @Getter private String gRPCHost;
+ @Setter @Getter private int gRPCPort;
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleProvider.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleProvider.java
new file mode 100644
index 0000000000000000000000000000000000000000..030742a779a82d795f5b0030573851766f93323c
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/CoreModuleProvider.java
@@ -0,0 +1,92 @@
+/*
+ * 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.oap.server.core;
+
+import org.apache.skywalking.oap.server.core.cluster.*;
+import org.apache.skywalking.oap.server.core.receiver.*;
+import org.apache.skywalking.oap.server.core.server.*;
+import org.apache.skywalking.oap.server.library.module.*;
+import org.apache.skywalking.oap.server.library.server.ServerException;
+import org.apache.skywalking.oap.server.library.server.grpc.GRPCServer;
+import org.apache.skywalking.oap.server.library.server.jetty.JettyServer;
+import org.slf4j.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public class CoreModuleProvider extends ModuleProvider {
+
+ private static final Logger logger = LoggerFactory.getLogger(CoreModuleProvider.class);
+
+ private final CoreModuleConfig moduleConfig;
+ private GRPCServer grpcServer;
+ private JettyServer jettyServer;
+
+ public CoreModuleProvider() {
+ super();
+ this.moduleConfig = new CoreModuleConfig();
+ }
+
+ @Override public String name() {
+ return "default";
+ }
+
+ @Override public Class module() {
+ return CoreModule.class;
+ }
+
+ @Override public ModuleConfig createConfigBeanIfAbsent() {
+ return moduleConfig;
+ }
+
+ @Override public void prepare() throws ServiceNotProvidedException {
+ grpcServer = new GRPCServer(moduleConfig.getGRPCHost(), moduleConfig.getGRPCPort());
+ grpcServer.initialize();
+
+ jettyServer = new JettyServer(moduleConfig.getRestHost(), moduleConfig.getRestPort(), moduleConfig.getRestContextPath());
+ jettyServer.initialize();
+
+ this.registerServiceImplementation(GRPCHandlerRegister.class, new GRPCHandlerRegisterImpl(grpcServer));
+ this.registerServiceImplementation(JettyHandlerRegister.class, new JettyHandlerRegisterImpl(jettyServer));
+
+ this.registerServiceImplementation(SourceReceiver.class, new SourceReceiverImpl());
+ }
+
+ @Override public void start() throws ModuleStartException {
+ try {
+ grpcServer.start();
+ jettyServer.start();
+ } catch (ServerException e) {
+ throw new ModuleStartException(e.getMessage(), e);
+ }
+ }
+
+ @Override public void notifyAfterCompleted() {
+ InstanceDetails gRPCServerInstance = new InstanceDetails();
+ gRPCServerInstance.setHost(moduleConfig.getGRPCHost());
+ gRPCServerInstance.setPort(moduleConfig.getGRPCPort());
+ this.getManager().find(ClusterModule.NAME).getService(ModuleRegister.class).register(CoreModule.NAME, "gRPC", gRPCServerInstance);
+
+ InstanceDetails restServerInstance = new InstanceDetails();
+ restServerInstance.setHost(moduleConfig.getRestHost());
+ restServerInstance.setPort(moduleConfig.getRestPort());
+ restServerInstance.setContextPath(moduleConfig.getRestContextPath());
+ this.getManager().find(ClusterModule.NAME).getService(ModuleRegister.class).register(CoreModule.NAME, "rest", restServerInstance);
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/AbstractAggregator.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/AbstractAggregator.java
new file mode 100644
index 0000000000000000000000000000000000000000..ea8a692cef605bb438ebb20c1429d52fc45689a1
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/AbstractAggregator.java
@@ -0,0 +1,124 @@
+/*
+ * 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.oap.server.core.analysis;
+
+import java.util.*;
+import org.apache.skywalking.apm.commons.datacarrier.DataCarrier;
+import org.apache.skywalking.apm.commons.datacarrier.consumer.IConsumer;
+import org.apache.skywalking.oap.server.core.analysis.data.*;
+import org.slf4j.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public abstract class AbstractAggregator {
+
+ private static final Logger logger = LoggerFactory.getLogger(AbstractAggregator.class);
+
+ private final DataCarrier dataCarrier;
+ private final MergeDataCache mergeDataCache;
+ private int messageNum;
+
+ public AbstractAggregator() {
+ this.mergeDataCache = new MergeDataCache<>();
+ this.dataCarrier = new DataCarrier<>(1, 10000);
+ this.dataCarrier.consume(new AggregatorConsumer(this), 1);
+ }
+
+ public void in(INPUT message) {
+ message.setEndOfBatchContext(new EndOfBatchContext(false));
+ dataCarrier.produce(message);
+ }
+
+ private void onWork(INPUT message) {
+ messageNum++;
+ aggregate(message);
+
+ if (messageNum >= 1000 || message.getEndOfBatchContext().isEndOfBatch()) {
+ sendToNext();
+ messageNum = 0;
+ }
+ }
+
+ private void sendToNext() {
+ mergeDataCache.switchPointer();
+ while (mergeDataCache.getLast().isWriting()) {
+ try {
+ Thread.sleep(10);
+ } catch (InterruptedException e) {
+ logger.error(e.getMessage(), e);
+ }
+ }
+
+ mergeDataCache.getLast().collection().forEach((INPUT key, INPUT data) -> {
+ if (logger.isDebugEnabled()) {
+ logger.debug(data.toString());
+ }
+
+ onNext(data);
+ });
+ mergeDataCache.finishReadingLast();
+ }
+
+ protected abstract void onNext(INPUT data);
+
+ private void aggregate(INPUT message) {
+ mergeDataCache.writing();
+ if (mergeDataCache.containsKey(message)) {
+// mergeDataCache.get(message).mergeAndFormulaCalculateData(message);
+ } else {
+ mergeDataCache.put(message);
+ }
+ mergeDataCache.finishWriting();
+ }
+
+ private class AggregatorConsumer implements IConsumer {
+
+ private final AbstractAggregator aggregator;
+
+ private AggregatorConsumer(AbstractAggregator aggregator) {
+ this.aggregator = aggregator;
+ }
+
+ @Override public void init() {
+
+ }
+
+ @Override public void consume(List data) {
+ Iterator inputIterator = data.iterator();
+
+ int i = 0;
+ while (inputIterator.hasNext()) {
+ INPUT input = inputIterator.next();
+ i++;
+ if (i == data.size()) {
+ input.getEndOfBatchContext().setEndOfBatch(true);
+ }
+ aggregator.onWork(input);
+ }
+ }
+
+ @Override public void onError(List data, Throwable t) {
+ logger.error(t.getMessage(), t);
+ }
+
+ @Override public void onExit() {
+ }
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/AvgIndicate.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/AvgIndicate.java
new file mode 100644
index 0000000000000000000000000000000000000000..4aee7b19dde9ddedefeca58cab17e8a2f10a3c5a
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/AvgIndicate.java
@@ -0,0 +1,39 @@
+/*
+ * 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.oap.server.core.analysis;
+
+import lombok.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public abstract class AvgIndicate extends Indicate {
+
+ @Setter @Getter private long times;
+ @Setter @Getter private long value;
+
+ public AvgIndicate(long timeBucket) {
+ super(timeBucket);
+ this.times = 1;
+ }
+
+ public long getAvg() {
+ return value / times;
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/DispatcherManager.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/DispatcherManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..de8da4e4e307e2138644495353a5d43f6a868348
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/DispatcherManager.java
@@ -0,0 +1,43 @@
+/*
+ * 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.oap.server.core.analysis;
+
+import java.util.*;
+import org.apache.skywalking.oap.server.core.analysis.endpoint.EndpointDispatcher;
+import org.apache.skywalking.oap.server.core.receiver.Scope;
+import org.slf4j.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public class DispatcherManager {
+
+ private static final Logger logger = LoggerFactory.getLogger(DispatcherManager.class);
+
+ private Map dispatcherMap;
+
+ public DispatcherManager() {
+ this.dispatcherMap = new HashMap<>();
+ this.dispatcherMap.put(Scope.Endpoint, new EndpointDispatcher());
+ }
+
+ public SourceDispatcher getDispatcher(Scope scope) {
+ return dispatcherMap.get(scope);
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Indicate.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Indicate.java
new file mode 100644
index 0000000000000000000000000000000000000000..e0185a3057b2bc45108b65394068fe7198c0b78e
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Indicate.java
@@ -0,0 +1,34 @@
+/*
+ * 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.oap.server.core.analysis;
+
+import lombok.Getter;
+import org.apache.skywalking.oap.server.core.analysis.data.StreamData;
+
+/**
+ * @author peng-yongsheng
+ */
+public abstract class Indicate extends StreamData {
+
+ @Getter private final long timeBucket;
+
+ public Indicate(long timeBucket) {
+ this.timeBucket = timeBucket;
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/SourceDispatcher.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/SourceDispatcher.java
new file mode 100644
index 0000000000000000000000000000000000000000..062601aaab80040428f81952200d513fa520c467
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/SourceDispatcher.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.skywalking.oap.server.core.analysis;
+
+import org.apache.skywalking.oap.server.core.receiver.Source;
+
+/**
+ * @author peng-yongsheng
+ */
+public interface SourceDispatcher {
+ void dispatch(S source);
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/Collection.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/Collection.java
new file mode 100644
index 0000000000000000000000000000000000000000..f1d52a800103da35c21c5a0d1887be11d4b9f780
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/Collection.java
@@ -0,0 +1,43 @@
+/*
+ * 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.oap.server.core.analysis.data;
+
+/**
+ * @author peng-yongsheng
+ */
+public interface Collection {
+
+ void reading();
+
+ boolean isReading();
+
+ void writing();
+
+ boolean isWriting();
+
+ void clear();
+
+ int size();
+
+ void finishReading();
+
+ void finishWriting();
+
+ Data collection();
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/DataCache.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/DataCache.java
new file mode 100644
index 0000000000000000000000000000000000000000..f26011e0c7d2492dceb9c1b5a9f3d46309fa0a6d
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/DataCache.java
@@ -0,0 +1,29 @@
+/*
+ * 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.oap.server.core.analysis.data;
+
+/**
+ * @author peng-yongsheng
+ */
+public interface DataCache {
+
+ void writing();
+
+ void finishWriting();
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/EndOfBatchContext.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/EndOfBatchContext.java
new file mode 100644
index 0000000000000000000000000000000000000000..528ace957c91900acaa1895a101f095f42d18b19
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/EndOfBatchContext.java
@@ -0,0 +1,39 @@
+/*
+ * 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.oap.server.core.analysis.data;
+
+/**
+ * @author peng-yongsheng
+ */
+public class EndOfBatchContext {
+
+ private boolean isEndOfBatch;
+
+ public EndOfBatchContext(boolean isEndOfBatch) {
+ this.isEndOfBatch = isEndOfBatch;
+ }
+
+ public boolean isEndOfBatch() {
+ return isEndOfBatch;
+ }
+
+ public void setEndOfBatch(boolean endOfBatch) {
+ isEndOfBatch = endOfBatch;
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/MergeDataCache.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/MergeDataCache.java
new file mode 100644
index 0000000000000000000000000000000000000000..8ef0354eeda6bb19e7b53f518dfdb282bc3f16d3
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/MergeDataCache.java
@@ -0,0 +1,52 @@
+/*
+ * 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.oap.server.core.analysis.data;
+
+/**
+ * @author peng-yongsheng
+ */
+public class MergeDataCache extends Window> implements DataCache {
+
+ private MergeDataCollection lockedMergeDataCollection;
+
+ @Override public MergeDataCollection collectionInstance() {
+ return new MergeDataCollection<>();
+ }
+
+ public boolean containsKey(STREAM_DATA key) {
+ return lockedMergeDataCollection.containsKey(key);
+ }
+
+ public StreamData get(STREAM_DATA key) {
+ return lockedMergeDataCollection.get(key);
+ }
+
+ public void put(STREAM_DATA data) {
+ lockedMergeDataCollection.put(data);
+ }
+
+ @Override public void writing() {
+ lockedMergeDataCollection = getCurrentAndWriting();
+ }
+
+ @Override public void finishWriting() {
+ lockedMergeDataCollection.finishWriting();
+ lockedMergeDataCollection = null;
+ }
+}
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/MergeDataCollection.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/MergeDataCollection.java
new file mode 100644
index 0000000000000000000000000000000000000000..07aa88c50c94b60949fb71d47bdfe5611de524a9
--- /dev/null
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/data/MergeDataCollection.java
@@ -0,0 +1,84 @@
+/*
+ * 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.oap.server.core.analysis.data;
+
+import java.util.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public class MergeDataCollection implements Collection
+
+ org.apache.skywalking
+ server-core
+ ${project.version}
+
+
org.apache.skywalkingcluster-standalone-plugin
@@ -45,10 +51,27 @@
cluster-zookeeper-plugin${project.version}
+
+
+
+
+ org.apache.skywalking
+ skywalking-receiver-plugin
+ ${project.version}
+
+
+
+
+
+ org.apache.skywalking
+ storage-h2-plugin
+ ${project.version}
+ org.apache.skywalking
- library-util
+ storage-elasticsearch-plugin${project.version}
+
\ No newline at end of file
diff --git a/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/ModuleManagerImpl.java b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/ModuleManagerImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..1448e70e0f025ceaa13598e60da2f2eb638a2533
--- /dev/null
+++ b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/ModuleManagerImpl.java
@@ -0,0 +1,75 @@
+/*
+ * 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.oap.server.starter;
+
+import java.util.*;
+import org.apache.skywalking.oap.server.core.CoreModule;
+import org.apache.skywalking.oap.server.core.cluster.ClusterModule;
+import org.apache.skywalking.oap.server.core.storage.StorageModule;
+import org.apache.skywalking.oap.server.library.module.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public class ModuleManagerImpl implements ModuleManager {
+
+ private final ApplicationConfiguration applicationConfiguration;
+ private final Map modules;
+
+ public ModuleManagerImpl(ApplicationConfiguration applicationConfiguration) {
+ this.applicationConfiguration = applicationConfiguration;
+ this.modules = new HashMap<>();
+ }
+
+ @Override
+ public void start() throws ServiceNotProvidedException, ModuleConfigException, ProviderNotFoundException, ModuleStartException {
+ CoreModule coreModule = new CoreModule();
+ ClusterModule clusterModule = new ClusterModule();
+ StorageModule storageModule = new StorageModule();
+
+ init(coreModule);
+ init(clusterModule);
+ init(storageModule);
+
+ coreModule.provider().start();
+ storageModule.provider().start();
+ clusterModule.provider().start();
+
+ coreModule.provider().notifyAfterCompleted();
+ storageModule.provider().notifyAfterCompleted();
+ clusterModule.provider().notifyAfterCompleted();
+ }
+
+ @Override public void init(
+ ModuleDefine moduleDefine) throws ServiceNotProvidedException, ModuleConfigException, ProviderNotFoundException {
+ if (!applicationConfiguration.has(moduleDefine.name())) {
+ throw new ModuleConfigException("Can't found core module configuration, please check the application.yml file.");
+ }
+
+ moduleDefine.prepare(this, applicationConfiguration.getModuleConfiguration(moduleDefine.name()));
+ modules.put(moduleDefine.name(), moduleDefine);
+ }
+
+ @Override public ModuleDefine find(String moduleName) throws ModuleNotFoundRuntimeException {
+ ModuleDefine module = modules.get(moduleName);
+ if (module != null)
+ return module;
+ throw new ModuleNotFoundRuntimeException(moduleName + " missing.");
+ }
+}
diff --git a/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPBootStartUp.java b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
similarity index 75%
rename from oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPBootStartUp.java
rename to oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
index 0bcf6bacf5598626bc105fc45ad216e70ac6af28..668aa5ede9710dc355ceeaf19338c3b9109805ee 100644
--- a/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPBootStartUp.java
+++ b/oap-server/server-starter/src/main/java/org/apache/skywalking/oap/server/starter/OAPServerStartUp.java
@@ -19,28 +19,30 @@
package org.apache.skywalking.oap.server.starter;
import java.util.concurrent.TimeUnit;
-import org.apache.skywalking.oap.server.library.module.*;
-import org.apache.skywalking.oap.server.starter.config.*;
+import org.apache.skywalking.oap.server.library.module.ApplicationConfiguration;
+import org.apache.skywalking.oap.server.starter.config.ApplicationConfigLoader;
import org.slf4j.*;
/**
* @author peng-yongsheng
*/
-public class OAPBootStartUp {
+public class OAPServerStartUp {
- private static final Logger logger = LoggerFactory.getLogger(OAPBootStartUp.class);
+ private static final Logger logger = LoggerFactory.getLogger(OAPServerStartUp.class);
public static void main(String[] args) {
ApplicationConfigLoader configLoader = new ApplicationConfigLoader();
- ModuleManager manager = new ModuleManager();
+
try {
ApplicationConfiguration applicationConfiguration = configLoader.load();
- manager.init(applicationConfiguration);
- } catch (ConfigFileNotFoundException | ModuleNotFoundException | ProviderNotFoundException | ServiceNotProvidedException | ModuleConfigException | ModuleStartException | DuplicateProviderException e) {
+ ModuleManagerImpl moduleManager = new ModuleManagerImpl(applicationConfiguration);
+ moduleManager.start();
+ } catch (Throwable e) {
logger.error(e.getMessage(), e);
System.exit(1);
}
+ logger.info("OAP server start up successful.");
try {
TimeUnit.MINUTES.sleep(5);
} catch (InterruptedException e) {
diff --git a/oap-server/server-starter/src/main/resources/application.yml b/oap-server/server-starter/src/main/resources/application.yml
index bfe498a4b27d917b7816f1b119b5cde6060e9025..5bdaa05e2e1dcdfe376ca404ad2cbb9d0bd77484 100644
--- a/oap-server/server-starter/src/main/resources/application.yml
+++ b/oap-server/server-starter/src/main/resources/application.yml
@@ -25,4 +25,13 @@ cluster:
# #OS real network IP(binding required), for agent to find collector cluster
# host: localhost
# port: 10800
-# contextPath: /
\ No newline at end of file
+# contextPath: /
+core:
+ default:
+ restHost: localhost
+ restPort: 12800
+ restContextPath: /
+ gRPCHost: localhost
+ gRPCPort: 11800
+storage:
+ elasticsearch:
diff --git a/oap-server/server-storage-plugin/pom.xml b/oap-server/server-storage-plugin/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ff237b04a06bbd6c70ec203ba1b2e41fbb5676e7
--- /dev/null
+++ b/oap-server/server-storage-plugin/pom.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+ oap-server
+ org.apache.skywalking
+ 6.0.0-alpha-SNAPSHOT
+
+ 4.0.0
+
+ server-storage-plugin
+ pom
+
+ storage-h2-plugin
+ storage-elasticsearch-plugin
+
+
+
\ No newline at end of file
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/pom.xml b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e0adc437021cdb3a2d2ac0caeaf10b0316bf2e4e
--- /dev/null
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/pom.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+ server-storage-plugin
+ org.apache.skywalking
+ 6.0.0-alpha-SNAPSHOT
+
+ 4.0.0
+
+ storage-elasticsearch-plugin
+ jar
+
+
+
+ org.apache.skywalking
+ server-core
+ ${project.version}
+
+
+
\ No newline at end of file
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..92768ad203eedf5aad28984051b55d64e35aefa8
--- /dev/null
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchConfig.java
@@ -0,0 +1,136 @@
+/*
+ * 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.oap.server.storage.plugin.elasticsearch;
+
+import org.apache.skywalking.oap.server.library.module.ModuleConfig;
+
+/**
+ * @author peng-yongsheng
+ */
+public class StorageModuleElasticsearchConfig extends ModuleConfig {
+
+ private int indexShardsNumber;
+ private int indexReplicasNumber;
+ private boolean highPerformanceMode;
+ private int traceDataTTL = 90;
+ private int minuteMetricDataTTL = 90;
+ private int hourMetricDataTTL = 36;
+ private int dayMetricDataTTL = 45;
+ private int monthMetricDataTTL = 18;
+ private int bulkActions = 2000;
+ private int bulkSize = 20;
+ private int flushInterval = 10;
+ private int concurrentRequests = 2;
+
+ int getIndexShardsNumber() {
+ return indexShardsNumber;
+ }
+
+ void setIndexShardsNumber(int indexShardsNumber) {
+ this.indexShardsNumber = indexShardsNumber;
+ }
+
+ int getIndexReplicasNumber() {
+ return indexReplicasNumber;
+ }
+
+ void setIndexReplicasNumber(int indexReplicasNumber) {
+ this.indexReplicasNumber = indexReplicasNumber;
+ }
+
+ boolean isHighPerformanceMode() {
+ return highPerformanceMode;
+ }
+
+ void setHighPerformanceMode(boolean highPerformanceMode) {
+ this.highPerformanceMode = highPerformanceMode;
+ }
+
+ public int getTraceDataTTL() {
+ return traceDataTTL;
+ }
+
+ void setTraceDataTTL(int traceDataTTL) {
+ this.traceDataTTL = traceDataTTL == 0 ? 90 : traceDataTTL;
+ }
+
+ public int getMinuteMetricDataTTL() {
+ return minuteMetricDataTTL;
+ }
+
+ void setMinuteMetricDataTTL(int minuteMetricDataTTL) {
+ this.minuteMetricDataTTL = minuteMetricDataTTL == 0 ? 90 : minuteMetricDataTTL;
+ }
+
+ public int getHourMetricDataTTL() {
+ return hourMetricDataTTL;
+ }
+
+ void setHourMetricDataTTL(int hourMetricDataTTL) {
+ this.hourMetricDataTTL = hourMetricDataTTL == 0 ? 36 : hourMetricDataTTL;
+ }
+
+ public int getDayMetricDataTTL() {
+ return dayMetricDataTTL;
+ }
+
+ void setDayMetricDataTTL(int dayMetricDataTTL) {
+ this.dayMetricDataTTL = dayMetricDataTTL == 0 ? 45 : dayMetricDataTTL;
+ }
+
+ public int getMonthMetricDataTTL() {
+ return monthMetricDataTTL;
+ }
+
+ void setMonthMetricDataTTL(int monthMetricDataTTL) {
+ this.monthMetricDataTTL = monthMetricDataTTL == 0 ? 18 : monthMetricDataTTL;
+ }
+
+ public int getBulkActions() {
+ return bulkActions;
+ }
+
+ public void setBulkActions(int bulkActions) {
+ this.bulkActions = bulkActions == 0 ? 2000 : bulkActions;
+ }
+
+ public int getBulkSize() {
+ return bulkSize;
+ }
+
+ public void setBulkSize(int bulkSize) {
+ this.bulkSize = bulkSize == 0 ? 20 : bulkSize;
+ }
+
+ public int getFlushInterval() {
+ return flushInterval;
+ }
+
+ public void setFlushInterval(int flushInterval) {
+ this.flushInterval = flushInterval == 0 ? 10 : flushInterval;
+ }
+
+ public int getConcurrentRequests() {
+ return concurrentRequests;
+ }
+
+ public void setConcurrentRequests(int concurrentRequests) {
+ this.concurrentRequests = concurrentRequests == 0 ? 2 : concurrentRequests;
+ }
+}
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java
new file mode 100644
index 0000000000000000000000000000000000000000..2a7a87555e2d004704376cd0c1589faba1334c9f
--- /dev/null
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/elasticsearch/StorageModuleElasticsearchProvider.java
@@ -0,0 +1,59 @@
+/*
+ * 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.oap.server.storage.plugin.elasticsearch;
+
+import org.apache.skywalking.oap.server.core.storage.StorageModule;
+import org.apache.skywalking.oap.server.library.module.*;
+import org.slf4j.*;
+
+/**
+ * @author peng-yongsheng
+ */
+public class StorageModuleElasticsearchProvider extends ModuleProvider {
+
+ private static final Logger logger = LoggerFactory.getLogger(StorageModuleElasticsearchProvider.class);
+
+ private final StorageModuleElasticsearchConfig storageConfig;
+
+ public StorageModuleElasticsearchProvider() {
+ super();
+ this.storageConfig = new StorageModuleElasticsearchConfig();
+ }
+
+ @Override public String name() {
+ return "elasticsearch";
+ }
+
+ @Override public Class module() {
+ return StorageModule.class;
+ }
+
+ @Override public ModuleConfig createConfigBeanIfAbsent() {
+ return storageConfig;
+ }
+
+ @Override public void prepare() throws ServiceNotProvidedException {
+ }
+
+ @Override public void start() throws ModuleStartException {
+ }
+
+ @Override public void notifyAfterCompleted() {
+ }
+}
diff --git a/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleProvider b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.module.ModuleProvider
new file mode 100644
index 0000000000000000000000000000000000000000..3bafa18fd317a26387ee7e1cc421c64e531e46c3
--- /dev/null
+++ b/oap-server/server-storage-plugin/storage-elasticsearch-plugin/src/main/resources/META-INF/services/org.apache.skywalking.oap.server.library.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.oap.server.storage.plugin.elasticsearch.StorageModuleElasticsearchProvider
\ No newline at end of file
diff --git a/oap-server/server-core/core-cluster/pom.xml b/oap-server/server-storage-plugin/storage-h2-plugin/pom.xml
similarity index 91%
rename from oap-server/server-core/core-cluster/pom.xml
rename to oap-server/server-storage-plugin/storage-h2-plugin/pom.xml
index c41d739f8e001de00654233af04e35f7f8619451..2cb644e48e9536c0a8fc77b304fc5543f3000798 100644
--- a/oap-server/server-core/core-cluster/pom.xml
+++ b/oap-server/server-storage-plugin/storage-h2-plugin/pom.xml
@@ -21,13 +21,13 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ server-storage-pluginorg.apache.skywalking
- server-core6.0.0-alpha-SNAPSHOT4.0.0
- core-cluster
+ storage-h2-pluginjar
\ No newline at end of file