提交 75595b9a 编写于 作者: wu-sheng's avatar wu-sheng

Backup the old collector, and init the new modulization codes.

上级 b4902723
......@@ -21,34 +21,34 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-agentjvm</artifactId>
<artifactId>apm-collector-3.2.3-agentjvm</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-stream</artifactId>
<artifactId>apm-collector-3.2.3-stream</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-server</artifactId>
<artifactId>apm-collector-3.2.3-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-storage</artifactId>
<artifactId>apm-collector-3.2.3-storage</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -21,29 +21,29 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-agentregister</artifactId>
<artifactId>apm-collector-3.2.3-agentregister</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-stream</artifactId>
<artifactId>apm-collector-3.2.3-stream</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-server</artifactId>
<artifactId>apm-collector-3.2.3-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
......@@ -53,7 +53,7 @@
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cache</artifactId>
<artifactId>apm-collector-3.2.3-cache</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -21,39 +21,39 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-ui</artifactId>
<artifactId>apm-collector-3.2.3-agentserver</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-server</artifactId>
<artifactId>apm-collector-3.2.3-agentstream</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-storage</artifactId>
<artifactId>apm-collector-3.2.3-agentregister</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cache</artifactId>
<artifactId>apm-collector-3.2.3-ui</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -21,49 +21,49 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-agentstream</artifactId>
<artifactId>apm-collector-3.2.3-agentstream</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-stream</artifactId>
<artifactId>apm-collector-3.2.3-stream</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-server</artifactId>
<artifactId>apm-collector-3.2.3-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-storage</artifactId>
<artifactId>apm-collector-3.2.3-storage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentjvm</artifactId>
<artifactId>apm-collector-3.2.3-agentjvm</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentregister</artifactId>
<artifactId>apm-collector-3.2.3-agentregister</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cache</artifactId>
<artifactId>apm-collector-3.2.3-cache</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -44,7 +44,7 @@ import org.skywalking.apm.collector.storage.h2.StorageH2ModuleDefine;
public class SegmentPost {
public static void main(String[] args) throws IOException, InterruptedException, CollectorException {
SystemConfig.DATA_PATH = "/Users/pengys5/code/sky-walking/sky-walking/apm-collector/data";
SystemConfig.DATA_PATH = "/Users/pengys5/code/sky-walking/sky-walking/apm-collector-3.2.3/data";
ElasticSearchClient elasticSearchClient = new ElasticSearchClient("CollectorDBCluster", true, "127.0.0.1:9300");
elasticSearchClient.initialize();
......
......@@ -35,7 +35,7 @@ import org.skywalking.apm.network.trace.component.ComponentsDefine;
public class SegmentBufferWriteWorkerTestCase {
public static void main(String[] args) throws WorkerException, ProviderNotFoundException {
SegmentBufferConfig.BUFFER_PATH = "/Users/pengys5/code/sky-walking/sky-walking/apm-collector/buffer/";
SegmentBufferConfig.BUFFER_PATH = "/Users/pengys5/code/sky-walking/sky-walking/apm-collector-3.2.3/buffer/";
SegmentStandardizationWorker worker = new SegmentStandardizationWorker(null, null);
worker.preStart();
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2017, OpenSkywalking Organization All rights reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ Project repository: https://github.com/OpenSkywalking/skywalking
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-boot</artifactId>
<packaging>jar</packaging>
<properties>
<main.class>org.skywalking.apm.collector.boot.CollectorBootStartUp</main.class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<docker.image.name>skywalking/skywalking-collector</docker.image.name>
<docker.image.version>${version}</docker.image.version>
</properties>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-3.2.3-queue</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-storage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-3.2.3-ui</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-3.2.3-agentserver</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-3.2.3-agentstream</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-3.2.3-agentregister</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-3.2.3-agentjvm</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>skywalking-collector</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<excludes>
<exclude>*.xml</exclude>
<exclude>*.config</exclude>
<exclude>*.yml</exclude>
</excludes>
<archive>
<manifest>
<mainClass>${main.class}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>${project.basedir}/../../packages</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration>
<skipDocker>false</skipDocker>
<imageName>${docker.image.name}</imageName>
<imageTags>
<imageTag>${docker.image.version}</imageTag>
</imageTags>
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.basedir}/../../packages</directory>
<include>${build.finalName}.tar.gz</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
......@@ -3,24 +3,24 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-cache</artifactId>
<artifactId>apm-collector-3.2.3-cache</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-storage</artifactId>
<artifactId>apm-collector-3.2.3-storage</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -21,19 +21,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-client</artifactId>
<artifactId>apm-collector-3.2.3-client</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
......
......@@ -21,24 +21,24 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-client</artifactId>
<artifactId>apm-collector-3.2.3-client</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -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">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<packaging>jar</packaging>
<dependencies>
......
......@@ -21,19 +21,19 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-queue</artifactId>
<artifactId>apm-collector-3.2.3-queue</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
......
......@@ -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">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-remote</artifactId>
<artifactId>apm-collector-3.2.3-remote</artifactId>
<packaging>jar</packaging>
<properties>
......
......@@ -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">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-server</artifactId>
<artifactId>apm-collector-3.2.3-server</artifactId>
<packaging>jar</packaging>
<properties>
......@@ -42,7 +42,7 @@
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
......
......@@ -21,7 +21,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
......@@ -33,17 +33,17 @@
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-remote</artifactId>
<artifactId>apm-collector-3.2.3-remote</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -21,44 +21,44 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-stream</artifactId>
<artifactId>apm-collector-3.2.3-stream</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-core</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-queue</artifactId>
<artifactId>apm-collector-3.2.3-queue</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-server</artifactId>
<artifactId>apm-collector-3.2.3-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-remote</artifactId>
<artifactId>apm-collector-3.2.3-remote</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-storage</artifactId>
<artifactId>apm-collector-3.2.3-storage</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
......@@ -21,39 +21,39 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<artifactId>apm-collector-3.2.3</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-agentserver</artifactId>
<artifactId>apm-collector-3.2.3-ui</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<artifactId>apm-collector-3.2.3-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-server</artifactId>
<artifactId>apm-collector-3.2.3-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentstream</artifactId>
<artifactId>apm-collector-3.2.3-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentregister</artifactId>
<artifactId>apm-collector-3.2.3-storage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-ui</artifactId>
<artifactId>apm-collector-3.2.3-cache</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2017, OpenSkywalking Organization All rights reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ Project repository: https://github.com/OpenSkywalking/skywalking
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<modules>
<module>apm-collector-cluster</module>
<module>apm-collector-core</module>
<module>apm-collector-queue</module>
<module>apm-collector-storage</module>
<module>apm-collector-client</module>
<module>apm-collector-server</module>
<module>apm-collector-agentstream</module>
<module>apm-collector-ui</module>
<module>apm-collector-boot</module>
<module>apm-collector-stream</module>
<module>apm-collector-agentserver</module>
<module>apm-collector-agentregister</module>
<module>apm-collector-agentjvm</module>
<module>apm-collector-remote</module>
<module>apm-collector-cache</module>
</modules>
<parent>
<artifactId>apm</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<artifactId>apm-collector-3.2.3</artifactId>
<packaging>pom</packaging>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.9.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
......@@ -28,125 +28,6 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-boot</artifactId>
<packaging>jar</packaging>
<properties>
<main.class>org.skywalking.apm.collector.boot.CollectorBootStartUp</main.class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<docker.image.name>skywalking/skywalking-collector</docker.image.name>
<docker.image.version>${version}</docker.image.version>
</properties>
<dependencies>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-cluster</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-queue</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-storage</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-ui</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentserver</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentstream</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentregister</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.skywalking</groupId>
<artifactId>apm-collector-agentjvm</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<finalName>skywalking-collector</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<excludes>
<exclude>*.xml</exclude>
<exclude>*.config</exclude>
<exclude>*.yml</exclude>
</excludes>
<archive>
<manifest>
<mainClass>${main.class}</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
<outputDirectory>${project.basedir}/../../packages</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration>
<skipDocker>false</skipDocker>
<imageName>${docker.image.name}</imageName>
<imageTags>
<imageTag>${docker.image.version}</imageTag>
</imageTags>
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.basedir}/../../packages</directory>
<include>${build.finalName}.tar.gz</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.boot;
public class CollectorBoot {
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2017, OpenSkywalking Organization All rights reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~
~ Project repository: https://github.com/OpenSkywalking/skywalking
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm-collector</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector-modulization-core</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
\ No newline at end of file
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
import java.util.HashMap;
import java.util.Properties;
public class ApplicationConfiguration {
private HashMap<String, ModuleConfiguration> modules = new HashMap<>();
public String[] moduleList() {
return modules.keySet().toArray(new String[0]);
}
public ModuleConfiguration getModuleConfiguration(String name) {
return modules.get(name);
}
public class ModuleConfiguration {
private HashMap<String, ProviderConfiguration> providers = new HashMap<>();
public Properties getProviderConfiguration(String name) {
return providers.get(name).properties;
}
}
public class ProviderConfiguration {
private Properties properties;
}
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
public class DuplicateProviderException extends Exception {
public DuplicateProviderException(String message) {
super(message);
}
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
import java.lang.reflect.InvocationTargetException;
import java.util.LinkedList;
import java.util.List;
import java.util.ServiceLoader;
/**
* A module definition.
*
* @author wu-sheng
*/
public abstract class Module {
private LinkedList<ModuleProvider> loadedProviders = new LinkedList<>();
/**
* @return the module name
*/
public abstract String name();
/**
* @return the {@link Service} provided by this module.
*/
public abstract Class<? extends Service>[] services();
void prepare(ModuleManager moduleManager,
ApplicationConfiguration.ModuleConfiguration configuration) throws ProviderNotFoundException {
ServiceLoader<ModuleProvider> moduleProviderLoader = ServiceLoader.load(ModuleProvider.class);
boolean providerExist = false;
for (ModuleProvider provider : moduleProviderLoader) {
providerExist = true;
if (provider.module().equals(getClass())) {
ModuleProvider newProvider;
try {
newProvider = provider.getClass().getConstructor(ModuleManager.class, Module.class).newInstance(moduleManager, this);
} catch (InstantiationException e) {
throw new ProviderNotFoundException(e);
} catch (IllegalAccessException e) {
throw new ProviderNotFoundException(e);
} catch (InvocationTargetException e) {
throw new ProviderNotFoundException(e);
} catch (NoSuchMethodException e) {
throw new ProviderNotFoundException(e);
}
loadedProviders.add(newProvider);
}
}
if (!providerExist) {
throw new ProviderNotFoundException("no provider exists.");
}
for (ModuleProvider moduleProvider : loadedProviders) {
moduleProvider.prepare(configuration.getProviderConfiguration(moduleProvider.name()));
}
}
void init(ModuleManager moduleManager,
ApplicationConfiguration.ModuleConfiguration configuration) throws ProviderNotFoundException, ModuleNotFoundException, ServiceNotProvidedException {
for (ModuleProvider provider : loadedProviders) {
String[] requiredModules = provider.requiredModules();
if (requiredModules != null) {
for (String module : requiredModules) {
if (!moduleManager.has(module)) {
throw new ModuleNotFoundException(module + " is required by " + name() + ", but not found.");
}
}
}
provider.init(configuration.getProviderConfiguration(provider.name()));
provider.requiredCheck(services());
}
}
/**
* @return providers of this module
*/
public List<ModuleProvider> providers() throws ProviderNotFoundException {
if (loadedProviders.size() == 0) {
throw new ProviderNotFoundException("no provider exists.");
}
return loadedProviders;
}
public ModuleProvider provider() throws ProviderNotFoundException, DuplicateProviderException {
if (loadedProviders.size() == 0) {
throw new ProviderNotFoundException("no provider exists.");
} else if (loadedProviders.size() > 1) {
throw new DuplicateProviderException("exist " + loadedProviders.size() + " providers");
}
return loadedProviders.getFirst();
}
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Map;
import java.util.ServiceLoader;
/**
* The <code>ModuleManager</code> takes charge of all {@link Module}s in collector.
*
* @author wu-sheng
*/
public class ModuleManager {
private Map<String, Module> loadedModules = new HashMap<>();
/**
* Init the given modules
*
* @param applicationConfiguration
*/
public void init(
ApplicationConfiguration applicationConfiguration) throws ModuleNotFoundException, ProviderNotFoundException, ServiceNotProvidedException {
String[] moduleNames = applicationConfiguration.moduleList();
ServiceLoader<Module> moduleServiceLoader = ServiceLoader.load(Module.class);
LinkedList<String> moduleList = new LinkedList(Arrays.asList(moduleNames));
for (Module module : moduleServiceLoader) {
for (String moduleName : moduleNames) {
if (moduleName.equals(module.name())) {
Module newInstance;
try {
newInstance = module.getClass().newInstance();
} catch (InstantiationException e) {
throw new ModuleNotFoundException(e);
} catch (IllegalAccessException e) {
throw new ModuleNotFoundException(e);
}
newInstance.prepare(this, applicationConfiguration.getModuleConfiguration(moduleName));
loadedModules.put(moduleName, module);
moduleList.remove(moduleName);
}
}
}
for (Module module : loadedModules.values()) {
module.init(this, applicationConfiguration.getModuleConfiguration(module.name()));
}
if (moduleList.size() > 0) {
throw new ModuleNotFoundException(moduleList.toString() + " missing.");
}
}
public boolean has(String moduleName) {
return loadedModules.get(moduleName) != null;
}
public Module find(String moduleName) throws ModuleNotFoundException {
Module module = loadedModules.get(moduleName);
if (module != null)
return module;
throw new ModuleNotFoundException(moduleName + " missing.");
}
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
public class ModuleNotFoundException extends Exception {
public ModuleNotFoundException(Throwable cause) {
super(cause);
}
public ModuleNotFoundException(String message) {
super(message);
}
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
/**
* The <code>ModuleProvider</code> is an implementation of a {@link Module}.
*
* And each module can have one or more implementation, which depends on `application.yml`
*
* @author wu-sheng
*/
public abstract class ModuleProvider {
protected ModuleManager manager;
protected Module module;
protected Map<Class<? extends Service>, Service> services = new HashMap<>();
public ModuleProvider() {
}
ModuleProvider(ModuleManager manager, Module module) {
this.manager = manager;
this.module = module;
}
/**
* @return the name of this provider.
*/
public abstract String name();
/**
* @return the module name
*/
public abstract Class<? extends Module> module();
/**
* In prepare stage, the module should initialize things which are irrelative other modules.
*
* @param config from `application.yml`
*/
public abstract void prepare(Properties config);
/**
* In prepare stage, the module can interop with other modules.
*
* @param config from `application.yml`
*/
public abstract void init(Properties config);
/**
* @return module names which does this module require?
*/
public abstract String[] requiredModules();
void requiredCheck(Class<? extends Service>[] requiredServices) throws ServiceNotProvidedException {
if (requiredServices == null)
return;
for (Class<? extends Service> service : requiredServices) {
if (!services.containsKey(service)) {
throw new ServiceNotProvidedException("Service:" + service.getName() + " not provided");
}
}
}
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
public class ProviderNotFoundException extends Exception {
public ProviderNotFoundException(String message) {
super(message);
}
public ProviderNotFoundException(Throwable e) {
super(e);
}
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
/**
* The <code>Service</code> implementation is a service provided by its own modules.
*
* And every {@link ModuleProvider} must provide all the given services of the {@link Module}.
*
* @author wu-sheng
*/
public interface Service {
}
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package org.skywalking.apm.collector.modulization;
public class ServiceNotProvidedException extends Exception {
public ServiceNotProvidedException(String message) {
super(message);
}
}
......@@ -17,33 +17,23 @@
~ Project repository: https://github.com/OpenSkywalking/skywalking
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<modules>
<module>apm-collector-cluster</module>
<module>apm-collector-core</module>
<module>apm-collector-queue</module>
<module>apm-collector-storage</module>
<module>apm-collector-client</module>
<module>apm-collector-server</module>
<module>apm-collector-agentstream</module>
<module>apm-collector-ui</module>
<module>apm-collector-boot</module>
<module>apm-collector-stream</module>
<module>apm-collector-agentserver</module>
<module>apm-collector-agentregister</module>
<module>apm-collector-agentjvm</module>
<module>apm-collector-remote</module>
<module>apm-collector-cache</module>
</modules>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>apm</artifactId>
<groupId>org.skywalking</groupId>
<version>3.2.3-2017</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>apm-collector</artifactId>
<packaging>pom</packaging>
<modules>
<module>apm-collector-boot</module>
<module>apm-collector-modulization-core</module>
</modules>
<properties>
</properties>
......
......@@ -63,8 +63,8 @@
<module>apm-commons</module>
<module>apm-sniffer</module>
<module>apm-application-toolkit</module>
<module>apm-collector</module>
<module>apm-network</module>
<module>apm-collector</module>
</modules>
<packaging>pom</packaging>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册