org.apache.zookeeper
diff --git a/skywalking-commons/skywalking-util/pom.xml b/skywalking-commons/skywalking-util/pom.xml
index a87b64307..301ef1d81 100644
--- a/skywalking-commons/skywalking-util/pom.xml
+++ b/skywalking-commons/skywalking-util/pom.xml
@@ -3,7 +3,7 @@
skywalking-commons
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
@@ -21,7 +21,7 @@
com.a.eye
skywalking-network
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-webui/src/main/java/com/a/eye/skywalking/web/config/ConfigInitializer.java b/skywalking-commons/skywalking-util/src/main/java/com/a/eye/skywalking/util/ConfigInitializer.java
similarity index 85%
rename from skywalking-webui/src/main/java/com/a/eye/skywalking/web/config/ConfigInitializer.java
rename to skywalking-commons/skywalking-util/src/main/java/com/a/eye/skywalking/util/ConfigInitializer.java
index 53c6e7b11..b43907e62 100644
--- a/skywalking-webui/src/main/java/com/a/eye/skywalking/web/config/ConfigInitializer.java
+++ b/skywalking-commons/skywalking-util/src/main/java/com/a/eye/skywalking/util/ConfigInitializer.java
@@ -1,4 +1,4 @@
-package com.a.eye.skywalking.web.config;
+package com.a.eye.skywalking.util;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
@@ -6,6 +6,12 @@ import java.util.LinkedList;
import java.util.Properties;
import java.util.logging.Logger;
+/**
+ * Init a class's static fields by a {@link Properties},
+ * including static fields and static inner classes.
+ *
+ * Created by wusheng on 2017/1/9.
+ */
public class ConfigInitializer {
private static Logger logger = Logger.getLogger(ConfigInitializer.class.getName());
@@ -13,11 +19,10 @@ public class ConfigInitializer {
initNextLevel(properties, rootConfigType, new ConfigDesc());
}
- private static void initNextLevel(Properties properties, Class> recentConfigType, ConfigDesc parentDesc) throws NumberFormatException, IllegalArgumentException, IllegalAccessException {
+ private static void initNextLevel(Properties properties, Class> recentConfigType, ConfigDesc parentDesc) throws IllegalArgumentException, IllegalAccessException {
for (Field field : recentConfigType.getFields()) {
if (Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(field.getModifiers())) {
- String configKey = (parentDesc + "." +
- field.getName()).toLowerCase();
+ String configKey = (parentDesc + "." + field.getName()).toLowerCase();
String value = properties.getProperty(configKey);
if (value != null) {
if (field.getType().equals(int.class))
diff --git a/skywalking-sniffer/pom.xml b/skywalking-sniffer/pom.xml
index dcfd4e1c9..28b9cec3a 100644
--- a/skywalking-sniffer/pom.xml
+++ b/skywalking-sniffer/pom.xml
@@ -5,7 +5,7 @@
skywalking
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
@@ -27,7 +27,7 @@
com.a.eye
skywalking-util
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-sniffer/skywalking-agent/dependency-reduced-pom.xml b/skywalking-sniffer/skywalking-agent/dependency-reduced-pom.xml
index e54bf1c87..6bae01f06 100644
--- a/skywalking-sniffer/skywalking-agent/dependency-reduced-pom.xml
+++ b/skywalking-sniffer/skywalking-agent/dependency-reduced-pom.xml
@@ -3,7 +3,7 @@
skywalking-sniffer
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
skywalking-agent
diff --git a/skywalking-sniffer/skywalking-agent/pom.xml b/skywalking-sniffer/skywalking-agent/pom.xml
index e7310007f..170d8db8d 100644
--- a/skywalking-sniffer/skywalking-agent/pom.xml
+++ b/skywalking-sniffer/skywalking-agent/pom.xml
@@ -5,7 +5,7 @@
com.a.eye
skywalking-sniffer
- ${skywalking.version}
+ 2.1-2017
skywalking-agent
@@ -30,56 +30,56 @@
com.a.eye
skywalking-jedis-2.x-plugin
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-jdbc-plugin
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-httpClient-4.x-plugin
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-dubbo-plugin
- ${skywalking.version}
+ 2.1-2017
com.a.eye
tomcat-7.x-8.x-plugin
- ${skywalking.version}
+ 2.1-2017
com.a.eye
motan-plugin
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-toolkit-log4j-1.x-activation
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-toolkit-log4j-2.x-activation
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-toolkit-logback-1.x-activation
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-toolkit-trace-context-activation
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-sniffer/skywalking-agent/src/main/java/com/a/eye/skywalking/agent/SkyWalkingAgent.java b/skywalking-sniffer/skywalking-agent/src/main/java/com/a/eye/skywalking/agent/SkyWalkingAgent.java
index 502fd5313..df3cf091e 100644
--- a/skywalking-sniffer/skywalking-agent/src/main/java/com/a/eye/skywalking/agent/SkyWalkingAgent.java
+++ b/skywalking-sniffer/skywalking-agent/src/main/java/com/a/eye/skywalking/agent/SkyWalkingAgent.java
@@ -2,7 +2,7 @@ package com.a.eye.skywalking.agent;
import com.a.eye.skywalking.agent.junction.SkyWalkingEnhanceMatcher;
import com.a.eye.skywalking.conf.Config;
-import com.a.eye.skywalking.conf.ConfigInitializer;
+import com.a.eye.skywalking.conf.SnifferConfigInitializer;
import com.a.eye.skywalking.logging.EasyLogResolver;
import com.a.eye.skywalking.logging.api.ILog;
import com.a.eye.skywalking.logging.api.LogManager;
@@ -98,7 +98,7 @@ public class SkyWalkingAgent {
Config.SkyWalking.IS_PREMAIN_MODE = true;
Config.SkyWalking.AGENT_BASE_PATH = initAgentBasePath();
- ConfigInitializer.initialize();
+ SnifferConfigInitializer.initialize();
}
/**
diff --git a/skywalking-sniffer/skywalking-api/pom.xml b/skywalking-sniffer/skywalking-api/pom.xml
index 435ddce4e..6d59dc74c 100644
--- a/skywalking-sniffer/skywalking-api/pom.xml
+++ b/skywalking-sniffer/skywalking-api/pom.xml
@@ -5,7 +5,7 @@
com.a.eye
skywalking-sniffer
- ${skywalking.version}
+ 2.1-2017
@@ -29,7 +29,7 @@
com.a.eye
skywalking-network
- ${skywalking.version}
+ 2.1-2017
com.lmax
diff --git a/skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/conf/ConfigInitializer.java b/skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/conf/ConfigInitializer.java
deleted file mode 100644
index 8a3d5dbb0..000000000
--- a/skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/conf/ConfigInitializer.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package com.a.eye.skywalking.conf;
-
-import com.a.eye.skywalking.logging.api.ILog;
-import com.a.eye.skywalking.logging.api.LogManager;
-import com.a.eye.skywalking.util.StringUtil;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.LinkedList;
-import java.util.Properties;
-
-public class ConfigInitializer {
- private static ILog logger = LogManager.getLogger(ConfigInitializer.class);
-
- public static void initialize() {
- InputStream configFileStream;
- if (Config.SkyWalking.IS_PREMAIN_MODE) {
- configFileStream = fetchAuthFileInputStream();
- } else {
- configFileStream = ConfigInitializer.class.getResourceAsStream("/sky-walking.config");
- }
-
- if (configFileStream == null) {
- logger.info("Not provide sky-walking certification documents, sky-walking api run in default config.");
- } else {
- try {
- Properties properties = new Properties();
- properties.load(configFileStream);
- initNextLevel(properties, Config.class, new ConfigDesc());
- } catch (Exception e) {
- logger.error("Failed to read the config file, sky-walking api run in default config.", e);
- }
- }
- Config.SkyWalking.USERNAME = System.getProperty("username");
- Config.SkyWalking.APPLICATION_CODE = System.getProperty("applicationCode");
- Config.SkyWalking.SERVERS = System.getProperty("servers");
-
- if(StringUtil.isEmpty(Config.SkyWalking.USERNAME)){
- throw new ExceptionInInitializerError("'-Dusername=' is missing.");
- }
- if(StringUtil.isEmpty(Config.SkyWalking.APPLICATION_CODE)){
- throw new ExceptionInInitializerError("'-DapplicationCode=' is missing.");
- }
- if(StringUtil.isEmpty(Config.SkyWalking.SERVERS)){
- throw new ExceptionInInitializerError("'-Dservers=' is missing.");
- }
- }
-
- private static void initNextLevel(Properties properties, Class> recentConfigType, ConfigDesc parentDesc) throws NumberFormatException, IllegalArgumentException, IllegalAccessException {
- for (Field field : recentConfigType.getFields()) {
- if (Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(field.getModifiers())) {
- String configKey = (parentDesc + "." +
- field.getName()).toLowerCase();
- String value = properties.getProperty(configKey);
- if (value != null) {
- if (field.getType().equals(int.class))
- field.set(null, Integer.valueOf(value));
- if (field.getType().equals(String.class))
- field.set(null, value);
- if (field.getType().equals(long.class))
- field.set(null, Long.valueOf(value));
- if (field.getType().equals(boolean.class))
- field.set(null, Boolean.valueOf(value));
- }
- }
- }
- for (Class> innerConfiguration : recentConfigType.getClasses()) {
- parentDesc.append(innerConfiguration.getSimpleName());
- initNextLevel(properties, innerConfiguration, parentDesc);
- parentDesc.removeLastDesc();
- }
- }
-
- private static InputStream fetchAuthFileInputStream() {
- try {
- return new FileInputStream(Config.SkyWalking.AGENT_BASE_PATH + File.separator + "/sky-walking.config");
- } catch (Exception e) {
- logger.warn("sky-walking.config is missing, use default config.");
- return null;
- }
- }
-}
-
-class ConfigDesc {
- private LinkedList descs = new LinkedList();
-
- void append(String currentDesc) {
- descs.addLast(currentDesc);
- }
-
- void removeLastDesc() {
- descs.removeLast();
- }
-
- @Override
- public String toString() {
- if (descs.size() == 0) {
- return "";
- }
- StringBuilder ret = new StringBuilder(descs.getFirst());
- boolean first = true;
- for (String desc : descs) {
- if (first) {
- first = false;
- continue;
- }
- ret.append(".").append(desc);
- }
- return ret.toString();
- }
-}
diff --git a/skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/conf/SnifferConfigInitializer.java b/skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/conf/SnifferConfigInitializer.java
new file mode 100644
index 000000000..1a04b78bf
--- /dev/null
+++ b/skywalking-sniffer/skywalking-api/src/main/java/com/a/eye/skywalking/conf/SnifferConfigInitializer.java
@@ -0,0 +1,58 @@
+package com.a.eye.skywalking.conf;
+
+import com.a.eye.skywalking.logging.api.ILog;
+import com.a.eye.skywalking.logging.api.LogManager;
+import com.a.eye.skywalking.util.ConfigInitializer;
+import com.a.eye.skywalking.util.StringUtil;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.Properties;
+
+public class SnifferConfigInitializer {
+ private static ILog logger = LogManager.getLogger(SnifferConfigInitializer.class);
+
+ public static void initialize() {
+ InputStream configFileStream;
+ if (Config.SkyWalking.IS_PREMAIN_MODE) {
+ configFileStream = fetchAuthFileInputStream();
+ } else {
+ configFileStream = SnifferConfigInitializer.class.getResourceAsStream("/sky-walking.config");
+ }
+
+ if (configFileStream == null) {
+ logger.info("Not provide sky-walking certification documents, sky-walking api run in default config.");
+ } else {
+ try {
+ Properties properties = new Properties();
+ properties.load(configFileStream);
+ ConfigInitializer.initialize(properties, Config.class);
+ } catch (Exception e) {
+ logger.error("Failed to read the config file, sky-walking api run in default config.", e);
+ }
+ }
+ Config.SkyWalking.USERNAME = System.getProperty("username");
+ Config.SkyWalking.APPLICATION_CODE = System.getProperty("applicationCode");
+ Config.SkyWalking.SERVERS = System.getProperty("servers");
+
+ if(StringUtil.isEmpty(Config.SkyWalking.USERNAME)){
+ throw new ExceptionInInitializerError("'-Dusername=' is missing.");
+ }
+ if(StringUtil.isEmpty(Config.SkyWalking.APPLICATION_CODE)){
+ throw new ExceptionInInitializerError("'-DapplicationCode=' is missing.");
+ }
+ if(StringUtil.isEmpty(Config.SkyWalking.SERVERS)){
+ throw new ExceptionInInitializerError("'-Dservers=' is missing.");
+ }
+ }
+
+ private static InputStream fetchAuthFileInputStream() {
+ try {
+ return new FileInputStream(Config.SkyWalking.AGENT_BASE_PATH + File.separator + "/sky-walking.config");
+ } catch (Exception e) {
+ logger.warn("sky-walking.config is missing, use default config.");
+ return null;
+ }
+ }
+}
diff --git a/skywalking-sniffer/skywalking-sdk-plugin/dubbo-plugin/pom.xml b/skywalking-sniffer/skywalking-sdk-plugin/dubbo-plugin/pom.xml
index 7ac8dc215..e14b6b36c 100644
--- a/skywalking-sniffer/skywalking-sdk-plugin/dubbo-plugin/pom.xml
+++ b/skywalking-sniffer/skywalking-sdk-plugin/dubbo-plugin/pom.xml
@@ -3,7 +3,7 @@
skywalking-sdk-plugin
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
@@ -21,7 +21,7 @@
com.a.eye
skywalking-api
- ${skywalking.version}
+ 2.1-2017
org.springframework
diff --git a/skywalking-sniffer/skywalking-sdk-plugin/httpClient-4.x-plugin/pom.xml b/skywalking-sniffer/skywalking-sdk-plugin/httpClient-4.x-plugin/pom.xml
index 480a1e36e..af08523cd 100644
--- a/skywalking-sniffer/skywalking-sdk-plugin/httpClient-4.x-plugin/pom.xml
+++ b/skywalking-sniffer/skywalking-sdk-plugin/httpClient-4.x-plugin/pom.xml
@@ -6,7 +6,7 @@
com.a.eye
skywalking-sdk-plugin
- ${skywalking.version}
+ 2.1-2017
skywalking-httpClient-4.x-plugin
@@ -23,7 +23,7 @@
com.a.eye
skywalking-api
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-sniffer/skywalking-sdk-plugin/jdbc-plugin/pom.xml b/skywalking-sniffer/skywalking-sdk-plugin/jdbc-plugin/pom.xml
index 4efd64cec..e7a60bc53 100755
--- a/skywalking-sniffer/skywalking-sdk-plugin/jdbc-plugin/pom.xml
+++ b/skywalking-sniffer/skywalking-sdk-plugin/jdbc-plugin/pom.xml
@@ -3,7 +3,7 @@
skywalking-sdk-plugin
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
@@ -21,7 +21,7 @@
com.a.eye
skywalking-api
- ${skywalking.version}
+ 2.1-2017
mysql
diff --git a/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/pom.xml b/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/pom.xml
index da839ed23..8f74a869c 100644
--- a/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/pom.xml
+++ b/skywalking-sniffer/skywalking-sdk-plugin/jedis-2.x-plugin/pom.xml
@@ -6,7 +6,7 @@
com.a.eye
skywalking-sdk-plugin
- ${skywalking.version}
+ 2.1-2017
skywalking-jedis-2.x-plugin
diff --git a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/pom.xml b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/pom.xml
index 27df74a5a..9d5f137ae 100644
--- a/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/pom.xml
+++ b/skywalking-sniffer/skywalking-sdk-plugin/motan-plugin/pom.xml
@@ -3,7 +3,7 @@
skywalking-sdk-plugin
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
diff --git a/skywalking-sniffer/skywalking-sdk-plugin/pom.xml b/skywalking-sniffer/skywalking-sdk-plugin/pom.xml
index a44831ff9..529e928b8 100644
--- a/skywalking-sniffer/skywalking-sdk-plugin/pom.xml
+++ b/skywalking-sniffer/skywalking-sdk-plugin/pom.xml
@@ -6,7 +6,7 @@
com.a.eye
skywalking-sniffer
- ${skywalking.version}
+ 2.1-2017
skywalking-sdk-plugin
@@ -31,7 +31,7 @@
com.a.eye
skywalking-api
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-sniffer/skywalking-sdk-plugin/tomcat-7.x-8.x-plugin/pom.xml b/skywalking-sniffer/skywalking-sdk-plugin/tomcat-7.x-8.x-plugin/pom.xml
index 8ef04d757..c24c9ed50 100644
--- a/skywalking-sniffer/skywalking-sdk-plugin/tomcat-7.x-8.x-plugin/pom.xml
+++ b/skywalking-sniffer/skywalking-sdk-plugin/tomcat-7.x-8.x-plugin/pom.xml
@@ -3,7 +3,7 @@
skywalking-sdk-plugin
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
diff --git a/skywalking-sniffer/skywalking-toolkit-activation/pom.xml b/skywalking-sniffer/skywalking-toolkit-activation/pom.xml
index f1b808e8e..a11af214e 100644
--- a/skywalking-sniffer/skywalking-toolkit-activation/pom.xml
+++ b/skywalking-sniffer/skywalking-toolkit-activation/pom.xml
@@ -5,7 +5,7 @@
skywalking-sniffer
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
pom
@@ -23,7 +23,7 @@
com.a.eye
skywalking-api
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-1.x-activation/pom.xml b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-1.x-activation/pom.xml
index 917461cf0..c7f98f575 100644
--- a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-1.x-activation/pom.xml
+++ b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-1.x-activation/pom.xml
@@ -5,7 +5,7 @@
skywalking-toolkit-activation
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
diff --git a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-2.x-activation/pom.xml b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-2.x-activation/pom.xml
index 497231a04..968158f3e 100644
--- a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-2.x-activation/pom.xml
+++ b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-log4j-2.x-activation/pom.xml
@@ -5,7 +5,7 @@
skywalking-toolkit-activation
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
diff --git a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-logback-1.x-activation/pom.xml b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-logback-1.x-activation/pom.xml
index 92bcf8a8b..66fcb6349 100644
--- a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-logback-1.x-activation/pom.xml
+++ b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-logback-1.x-activation/pom.xml
@@ -5,7 +5,7 @@
skywalking-toolkit-activation
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
diff --git a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-opentracing-activation/pom.xml b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-opentracing-activation/pom.xml
index 531f15c9b..82e2ecab0 100644
--- a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-opentracing-activation/pom.xml
+++ b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-opentracing-activation/pom.xml
@@ -5,7 +5,7 @@
skywalking-toolkit-activation
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
diff --git a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-trace-context-activation/pom.xml b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-trace-context-activation/pom.xml
index a01200d8f..3a25d2bf2 100644
--- a/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-trace-context-activation/pom.xml
+++ b/skywalking-sniffer/skywalking-toolkit-activation/skywalking-toolkit-trace-context-activation/pom.xml
@@ -4,7 +4,7 @@
skywalking-toolkit-activation
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
@@ -16,7 +16,7 @@
com.a.eye
skywalking-api
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-storage-center/pom.xml b/skywalking-storage-center/pom.xml
index 626f62b70..975b0d363 100644
--- a/skywalking-storage-center/pom.xml
+++ b/skywalking-storage-center/pom.xml
@@ -5,7 +5,7 @@
skywalking
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
@@ -22,7 +22,7 @@
com.a.eye
skywalking-network
- ${skywalking.version}
+ 2.1-2017
com.lmax
@@ -32,17 +32,17 @@
com.a.eye
skywalking-registry
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-logging-impl-log4j2
- ${skywalking.version}
+ 2.1-2017
com.a.eye
skywalking-health-report
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-storage-center/skywalking-routing/pom.xml b/skywalking-storage-center/skywalking-routing/pom.xml
index a16582fd7..5dbbb35c2 100644
--- a/skywalking-storage-center/skywalking-routing/pom.xml
+++ b/skywalking-storage-center/skywalking-routing/pom.xml
@@ -4,7 +4,7 @@
skywalking-storage-center
com.a.eye
- ${skywalking.version}
+ 2.1-2017
4.0.0
@@ -28,7 +28,7 @@
com.a.eye
skywalking-util
- ${skywalking.version}
+ 2.1-2017
@@ -74,7 +74,7 @@
${project.basedir}/docker
skywalking/skywalking-routing
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/Main.java b/skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/Main.java
index 61567750d..405e1bb53 100644
--- a/skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/Main.java
+++ b/skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/Main.java
@@ -9,15 +9,25 @@ import com.a.eye.skywalking.registry.api.RegistryCenter;
import com.a.eye.skywalking.registry.assist.NetUtils;
import com.a.eye.skywalking.registry.impl.zookeeper.ZookeeperConfig;
import com.a.eye.skywalking.routing.config.Config;
-import com.a.eye.skywalking.routing.config.ConfigInitializer;
import com.a.eye.skywalking.routing.listener.SpanStorageListenerImpl;
import com.a.eye.skywalking.routing.listener.TraceSearchListenerImpl;
import com.a.eye.skywalking.routing.router.RoutingService;
+import com.a.eye.skywalking.util.ConfigInitializer;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
+/**
+ * Main Class of the routing server.
+ * It starts server in a sequence:
+ * 1. init config
+ * 2. init logManager
+ * 3. registry server
+ * 4. open service, and start listening port.
+ *
+ * @author wusheng
+ */
public class Main {
private static final ILog logger = LogManager.getLogger(Main.class);
diff --git a/skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/config/ConfigInitializer.java b/skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/config/ConfigInitializer.java
deleted file mode 100644
index 4a505dfb0..000000000
--- a/skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/config/ConfigInitializer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.a.eye.skywalking.routing.config;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.LinkedList;
-import java.util.Properties;
-import java.util.logging.Logger;
-
-public class ConfigInitializer {
- private static Logger logger = Logger.getLogger(ConfigInitializer.class.getName());
-
- public static void initialize(Properties properties, Class> rootConfigType) throws IllegalAccessException {
- initNextLevel(properties, rootConfigType, new ConfigDesc());
- }
-
- private static void initNextLevel(Properties properties, Class> recentConfigType, ConfigDesc parentDesc) throws NumberFormatException, IllegalArgumentException, IllegalAccessException {
- for (Field field : recentConfigType.getFields()) {
- if (Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(field.getModifiers())) {
- String configKey = (parentDesc + "." +
- field.getName()).toLowerCase();
- String value = properties.getProperty(configKey);
- if (value != null) {
- if (field.getType().equals(int.class))
- field.set(null, Integer.valueOf(value));
- if (field.getType().equals(String.class))
- field.set(null, value);
- if (field.getType().equals(long.class))
- field.set(null, Long.valueOf(value));
- if (field.getType().equals(boolean.class))
- field.set(null, Boolean.valueOf(value));
- }
- }
- }
- for (Class> innerConfiguration : recentConfigType.getClasses()) {
- parentDesc.append(innerConfiguration.getSimpleName());
- initNextLevel(properties, innerConfiguration, parentDesc);
- parentDesc.removeLastDesc();
- }
- }
-}
-
-
-class ConfigDesc {
- private LinkedList descs = new LinkedList();
-
- void append(String currentDesc) {
- descs.addLast(currentDesc);
- }
-
- void removeLastDesc() {
- descs.removeLast();
- }
-
- @Override
- public String toString() {
- if (descs.size() == 0) {
- return "";
- }
- StringBuilder ret = new StringBuilder(descs.getFirst());
- boolean first = true;
- for (String desc : descs) {
- if (first) {
- first = false;
- continue;
- }
- ret.append(".").append(desc);
- }
- return ret.toString();
- }
-}
diff --git a/skywalking-storage-center/skywalking-storage/null/data/file/2017_01_09_15_24_02_220_1000 b/skywalking-storage-center/skywalking-storage/null/data/file/2017_01_09_15_24_02_220_1000
new file mode 100644
index 000000000..bf032887c
--- /dev/null
+++ b/skywalking-storage-center/skywalking-storage/null/data/file/2017_01_09_15_24_02_220_1000
@@ -0,0 +1,4 @@
+2
+
+username_612
+application_code_9app
\ No newline at end of file
diff --git a/skywalking-storage-center/skywalking-storage/null/data/file/2017_01_09_15_27_09_291_1000 b/skywalking-storage-center/skywalking-storage/null/data/file/2017_01_09_15_27_09_291_1000
new file mode 100644
index 000000000..bf032887c
--- /dev/null
+++ b/skywalking-storage-center/skywalking-storage/null/data/file/2017_01_09_15_27_09_291_1000
@@ -0,0 +1,4 @@
+2
+
+username_612
+application_code_9app
\ No newline at end of file
diff --git a/skywalking-storage-center/skywalking-storage/pom.xml b/skywalking-storage-center/skywalking-storage/pom.xml
index 4f21f4a62..ad0d79171 100644
--- a/skywalking-storage-center/skywalking-storage/pom.xml
+++ b/skywalking-storage-center/skywalking-storage/pom.xml
@@ -5,7 +5,7 @@
skywalking-storage-center
com.a.eye
- ${skywalking.version}
+ 2.1-2017
skywalking-storage
@@ -36,7 +36,7 @@
com.a.eye
skywalking-util
- ${skywalking.version}
+ 2.1-2017
@@ -116,7 +116,7 @@
${project.basedir}/docker
skywalking/skywalking-storage
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/Main.java b/skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/Main.java
index 9225e5e6d..7d96fa2d8 100644
--- a/skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/Main.java
+++ b/skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/Main.java
@@ -8,17 +8,16 @@ import com.a.eye.skywalking.network.Server;
import com.a.eye.skywalking.registry.RegistryCenterFactory;
import com.a.eye.skywalking.registry.api.CenterType;
import com.a.eye.skywalking.registry.api.RegistryCenter;
+import com.a.eye.skywalking.registry.assist.NetUtils;
import com.a.eye.skywalking.registry.impl.zookeeper.ZookeeperConfig;
import com.a.eye.skywalking.storage.boot.ElasticBootstrap;
import com.a.eye.skywalking.storage.config.Config;
-import com.a.eye.skywalking.storage.config.ConfigInitializer;
import com.a.eye.skywalking.storage.data.file.DataFilesManager;
import com.a.eye.skywalking.storage.data.index.IndexOperatorFactory;
import com.a.eye.skywalking.storage.listener.SearchListener;
import com.a.eye.skywalking.storage.listener.StorageListener;
-import com.a.eye.skywalking.registry.assist.NetUtils;
+import com.a.eye.skywalking.util.ConfigInitializer;
-import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
diff --git a/skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/config/ConfigInitializer.java b/skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/config/ConfigInitializer.java
deleted file mode 100644
index 1a5ea4ad0..000000000
--- a/skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/config/ConfigInitializer.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package com.a.eye.skywalking.storage.config;
-
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.LinkedList;
-import java.util.Properties;
-import java.util.logging.Logger;
-
-public class ConfigInitializer {
- private static Logger logger = Logger.getLogger(ConfigInitializer.class.getName());
-
- public static void initialize(Properties properties, Class> rootConfigType) throws IllegalAccessException {
- initNextLevel(properties, rootConfigType, new ConfigDesc());
- }
-
- private static void initNextLevel(Properties properties, Class> recentConfigType, ConfigDesc parentDesc) throws NumberFormatException, IllegalArgumentException, IllegalAccessException {
- for (Field field : recentConfigType.getFields()) {
- if (Modifier.isPublic(field.getModifiers()) && Modifier.isStatic(field.getModifiers())) {
- String configKey = (parentDesc + "." +
- field.getName()).toLowerCase();
- String value = properties.getProperty(configKey);
- if (value != null) {
- if (field.getType().equals(int.class))
- field.set(null, Integer.valueOf(value));
- if (field.getType().equals(String.class))
- field.set(null, value);
- if (field.getType().equals(long.class))
- field.set(null, Long.valueOf(value));
- if (field.getType().equals(boolean.class))
- field.set(null, Boolean.valueOf(value));
- }
- }
- }
- for (Class> innerConfiguration : recentConfigType.getClasses()) {
- parentDesc.append(innerConfiguration.getSimpleName());
- initNextLevel(properties, innerConfiguration, parentDesc);
- parentDesc.removeLastDesc();
- }
- }
-}
-
-
-class ConfigDesc {
- private LinkedList descs = new LinkedList();
-
- void append(String currentDesc) {
- descs.addLast(currentDesc);
- }
-
- void removeLastDesc() {
- descs.removeLast();
- }
-
- @Override
- public String toString() {
- if (descs.size() == 0) {
- return "";
- }
- StringBuilder ret = new StringBuilder(descs.getFirst());
- boolean first = true;
- for (String desc : descs) {
- if (first) {
- first = false;
- continue;
- }
- ret.append(".").append(desc);
- }
- return ret.toString();
- }
-}
diff --git a/skywalking-webui/pom.xml b/skywalking-webui/pom.xml
index 501d39254..d8f7f99b5 100644
--- a/skywalking-webui/pom.xml
+++ b/skywalking-webui/pom.xml
@@ -6,7 +6,7 @@
skywalking
com.a.eye
- ${skywalking.version}
+ 2.1-2017
skywalking-webui
@@ -20,7 +20,7 @@
com.a.eye
skywalking-network
- ${skywalking.version}
+ 2.1-2017
com.a.eye
@@ -111,7 +111,7 @@
com.a.eye
skywalking-util
- ${skywalking.version}
+ 2.1-2017
@@ -128,7 +128,7 @@
${project.basedir}/docker
skywalking/skywalking-webui
- ${skywalking.version}
+ 2.1-2017
diff --git a/skywalking-webui/src/main/java/com/a/eye/skywalking/web/controller/SearchController.java b/skywalking-webui/src/main/java/com/a/eye/skywalking/web/controller/SearchController.java
index f885b25f2..cd96df805 100644
--- a/skywalking-webui/src/main/java/com/a/eye/skywalking/web/controller/SearchController.java
+++ b/skywalking-webui/src/main/java/com/a/eye/skywalking/web/controller/SearchController.java
@@ -3,11 +3,11 @@ package com.a.eye.skywalking.web.controller;
import com.a.eye.skywalking.registry.RegistryCenterFactory;
import com.a.eye.skywalking.registry.api.RegistryCenter;
import com.a.eye.skywalking.registry.impl.zookeeper.ZookeeperConfig;
+import com.a.eye.skywalking.util.ConfigInitializer;
import com.a.eye.skywalking.util.StringUtil;
import com.a.eye.skywalking.web.client.routing.RoutingServerWatcher;
import com.a.eye.skywalking.web.common.BaseController;
import com.a.eye.skywalking.web.config.Config;
-import com.a.eye.skywalking.web.config.ConfigInitializer;
import com.a.eye.skywalking.web.dto.TraceTreeInfo;
import com.a.eye.skywalking.web.service.inter.ITraceTreeService;
import com.alibaba.fastjson.JSON;