Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
javalover123888
SkyWalking
提交
e04fbee8
S
SkyWalking
项目概览
javalover123888
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / SkyWalking
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e04fbee8
编写于
12月 16, 2016
作者:
A
ascrutae
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复部分问题
上级
262309ba
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
250 addition
and
278 deletion
+250
-278
skywalking-alarm/bin/sw-alarm-server.sh
skywalking-alarm/bin/sw-alarm-server.sh
+5
-1
skywalking-alarm/pom.xml
skywalking-alarm/pom.xml
+7
-116
skywalking-alarm/src/main/assembly/assembly.xml
skywalking-alarm/src/main/assembly/assembly.xml
+36
-0
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/AlarmMessageProcessThread.java
...com/a/eye/skywalking/alarm/AlarmMessageProcessThread.java
+0
-1
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/UserInfoCoordinator.java
.../java/com/a/eye/skywalking/alarm/UserInfoCoordinator.java
+0
-2
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/dao/SystemConfigDao.java
.../java/com/a/eye/skywalking/alarm/dao/SystemConfigDao.java
+0
-41
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/model/AlarmRule.java
...main/java/com/a/eye/skywalking/alarm/model/AlarmRule.java
+0
-1
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/procesor/AlarmMessageProcessor.java
.../eye/skywalking/alarm/procesor/AlarmMessageProcessor.java
+0
-3
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/util/AlarmTypeUtil.java
...n/java/com/a/eye/skywalking/alarm/util/AlarmTypeUtil.java
+3
-16
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/util/RedisUtil.java
.../main/java/com/a/eye/skywalking/alarm/util/RedisUtil.java
+1
-1
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/util/TemplateConfigurationUtil.java
.../eye/skywalking/alarm/util/TemplateConfigurationUtil.java
+0
-1
skywalking-storage-center/skywalking-routing/bin/routingServer.sh
...ng-storage-center/skywalking-routing/bin/routingServer.sh
+27
-0
skywalking-storage-center/skywalking-routing/pom.xml
skywalking-storage-center/skywalking-routing/pom.xml
+37
-8
skywalking-storage-center/skywalking-routing/src/main/assembly/assembly.xml
...-center/skywalking-routing/src/main/assembly/assembly.xml
+36
-0
skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/Main.java
...ting/src/main/java/com/a/eye/skywalking/routing/Main.java
+2
-2
skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/alarm/sender/AlarmMessageSender.java
...e/skywalking/routing/alarm/sender/AlarmMessageSender.java
+3
-0
skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/config/Config.java
...main/java/com/a/eye/skywalking/routing/config/Config.java
+1
-1
skywalking-storage-center/skywalking-routing/src/main/resources/config.properties
...r/skywalking-routing/src/main/resources/config.properties
+38
-0
skywalking-storage-center/skywalking-routing/src/main/resources/log4j.properties
...er/skywalking-routing/src/main/resources/log4j.properties
+1
-1
skywalking-storage-center/skywalking-storage/bin/storageServer.sh
...ng-storage-center/skywalking-storage/bin/storageServer.sh
+5
-1
skywalking-storage-center/skywalking-storage/pom.xml
skywalking-storage-center/skywalking-storage/pom.xml
+13
-81
skywalking-storage-center/skywalking-storage/src/main/assembly/assembly.xml
...-center/skywalking-storage/src/main/assembly/assembly.xml
+34
-0
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/boot/ElasticBootstrap.java
...a/com/a/eye/skywalking/storage/boot/ElasticBootstrap.java
+1
-1
未找到文件。
skywalking-alarm/bin/sw-alarm-server.sh
浏览文件 @
e04fbee8
...
...
@@ -26,9 +26,13 @@ done
# Get standard environment variables
SW_ALARM_ALARM_SERVER_BIN_DIR
=
`
dirname
"
$SW_ALARM_ALARM_SERVER_BIN
"
`
SW_ALARM_ALARM_PREFIX
=
"
${
SW_ALARM_ALARM_SERVER_BIN_DIR
}
/.."
SW_ALARM_ALARM_LOG_DIR
=
"
${
SW_ALARM_ALARM_SERVER_BIN_DIR
}
/../log"
SW_ALARM_ALARM_LOG_DIR
=
"
${
SW_ALARM_ALARM_SERVER_BIN_DIR
}
/../log
s
"
SW_ALARM_ALARM_CFG_DIR
=
"
${
SW_ALARM_ALARM_SERVER_BIN_DIR
}
/../config"
if
[
!
-d
"
${
SW_ALARM_ALARM_LOG_DIR
}
"
]
;
then
mkdir
-p
${
SW_ALARM_ALARM_LOG_DIR
}
fi
#echo $SW_ALARM_ALARM_SERVER_BIN_DIR
#set java home
if
[
"
$JAVA_HOME
"
!=
""
]
;
then
...
...
skywalking-alarm/pom.xml
浏览文件 @
e04fbee8
...
...
@@ -10,10 +10,6 @@
<name>
skywalking-alarm
</name>
<url>
http://maven.apache.org
</url>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
...
...
@@ -73,63 +69,26 @@
</dependency>
</dependencies>
<build>
<finalName>
skywalking-alarm
</finalName>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
2.6
</version>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
copy-resources
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-resources
</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/installer/config
</outputDirectory>
<resources>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
false
</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>
copy-start-script
</id>
<id>
make-zip
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-resources
</goal>
<goal>
single
</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/installer/bin
</outputDirectory>
<resources>
<resource>
<directory>
bin
</directory>
<filtering>
false
</filtering>
</resource>
</resources>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-dependency-plugin
</artifactId>
<executions>
<execution>
<id>
copy-dependencies
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-dependencies
</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>
${project.build.directory}/installer/lib
</outputDirectory>
<excludeTransitive>
false
</excludeTransitive>
<stripVersion>
true
</stripVersion>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-jar-plugin
</artifactId>
<configuration>
...
...
@@ -137,76 +96,8 @@
<exclude>
*.properties
</exclude>
<exclude>
*.xml
</exclude>
</excludes>
<outputDirectory>
${project.build.directory}/installer/lib
</outputDirectory>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-antrun-plugin
</artifactId>
<executions>
<execution>
<id>
clean
</id>
<phase>
package
</phase>
<goals>
<goal>
run
</goal>
</goals>
<configuration>
<tasks>
<mkdir
dir=
"${project.build.directory}/installer/log"
/>
<mkdir
dir=
"${project.build.directory}/installer/bin"
/>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-compiler-plugin
</artifactId>
<configuration>
<source>
1.7
</source>
<target>
1.7
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
</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>
<repositories>
<repository>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
<id>
bintray-wu-sheng-DataCarrier
</id>
<name>
bintray
</name>
<url>
http://dl.bintray.com/wu-sheng/DataCarrier
</url>
</repository>
<repository>
<id>
mvnrepository
</id>
<name>
mvnrepository
</name>
<url>
http://mvnrepository.com
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
<repository>
<id>
jbossrepository
</id>
<name>
jboss repository
</name>
<url>
http://repository.jboss.com
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
</repositories>
</project>
skywalking-alarm/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
e04fbee8
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id></id>
<formats>
<format>
zip
</format>
</formats>
<dependencySets>
<dependencySet>
<outputDirectory>
/libs
</outputDirectory>
<scope>
runtime
</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>
${project.basedir}/bin
</directory>
<outputDirectory>
/bin
</outputDirectory>
<includes>
<include>
sw-alarm-server.sh
</include>
</includes>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
src/main/resources
</directory>
<outputDirectory>
/config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}/${build.finalName}
</directory>
<outputDirectory>
/libs
</outputDirectory>
<includes>
<include>
${build.finalName}.jar
</include>
</includes>
</fileSet>
</fileSets>
</assembly>
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/AlarmMessageProcessThread.java
浏览文件 @
e04fbee8
...
...
@@ -147,7 +147,6 @@ public class AlarmMessageProcessThread extends Thread {
private
class
CoordinatorStatusWatcher
implements
CuratorWatcher
{
@Override
public
void
process
(
WatchedEvent
watchedEvent
)
throws
Exception
{
if
(
watchedEvent
.
getType
()
==
Watcher
.
Event
.
EventType
.
NodeDataChanged
)
{
String
value
=
ZKUtil
.
getPathData
(
Config
.
ZKPath
.
REGISTER_SERVER_PATH
+
"/"
+
threadId
);
...
...
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/UserInfoCoordinator.java
浏览文件 @
e04fbee8
...
...
@@ -223,8 +223,6 @@ public class UserInfoCoordinator extends Thread {
}
public
class
RegisterServerWatcher
implements
CuratorWatcher
{
@Override
public
void
process
(
WatchedEvent
watchedEvent
)
{
if
(
watchedEvent
.
getType
()
==
Watcher
.
Event
.
EventType
.
NodeChildrenChanged
)
{
redistributing
=
true
;
...
...
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/dao/SystemConfigDao.java
已删除
100644 → 0
浏览文件 @
262309ba
package
com.a.eye.skywalking.alarm.dao
;
import
com.a.eye.skywalking.alarm.util.DBConnectUtil
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
public
class
SystemConfigDao
{
private
static
Logger
logger
=
LogManager
.
getLogger
(
AlarmMessageDao
.
class
);
public
static
String
getSystemConfig
(
String
configId
)
throws
SQLException
{
String
result
=
""
;
Connection
connection
=
DBConnectUtil
.
getConnection
();
try
{
PreparedStatement
ps
=
connection
.
prepareStatement
(
"SELECT system_config.conf_value FROM system_config WHERE system_config.sts = "
+
"? AND system_config.config_id = ?"
);
ps
.
setString
(
1
,
"A"
);
ps
.
setString
(
2
,
configId
);
ResultSet
resultSet
=
ps
.
executeQuery
();
resultSet
.
next
();
result
=
resultSet
.
getString
(
"conf_value"
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"Failed to find systemConfig."
);
throw
e
;
}
finally
{
if
(
connection
!=
null
)
{
connection
.
close
();
}
}
return
result
;
}
}
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/model/AlarmRule.java
浏览文件 @
e04fbee8
...
...
@@ -81,7 +81,6 @@ public class AlarmRule {
private
static
long
getPreviousFireTime
(
final
String
userId
,
final
String
ruleId
)
{
return
RedisUtil
.
execute
(
new
RedisUtil
.
Executable
<
Long
>()
{
@Override
public
Long
exe
(
Jedis
client
)
{
String
previousTime
=
client
.
get
(
userId
+
"-"
+
ruleId
);
if
(
previousTime
==
null
||
previousTime
.
length
()
<=
0
)
{
...
...
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/procesor/AlarmMessageProcessor.java
浏览文件 @
e04fbee8
...
...
@@ -156,7 +156,6 @@ public class AlarmMessageProcessor {
private
void
expiredAlarmMessage
(
final
String
key
)
{
RedisUtil
.
execute
(
new
RedisUtil
.
Executable
<
Long
>()
{
@Override
public
Long
exe
(
Jedis
client
)
{
return
client
.
expire
(
key
,
0
);
}
...
...
@@ -166,7 +165,6 @@ public class AlarmMessageProcessor {
private
void
savePreviousFireTime
(
final
String
userId
,
final
String
ruleId
,
final
long
currentFireMinuteTime
)
{
RedisUtil
.
execute
(
new
RedisUtil
.
Executable
<
Long
>()
{
@Override
public
Long
exe
(
Jedis
client
)
{
return
client
.
hset
(
userId
,
ruleId
,
String
.
valueOf
(
currentFireMinuteTime
));
...
...
@@ -177,7 +175,6 @@ public class AlarmMessageProcessor {
private
void
setAlarmMessages
(
final
String
key
,
final
Collection
<
AlarmMessage
>
warningTracingIds
)
{
RedisUtil
.
execute
(
new
RedisUtil
.
Executable
<
Object
>()
{
@Override
public
Collection
<
String
>
exe
(
Jedis
client
)
{
Map
<
String
,
String
>
result
=
client
.
hgetAll
(
key
);
if
(
result
!=
null
)
{
...
...
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/util/AlarmTypeUtil.java
浏览文件 @
e04fbee8
package
com.a.eye.skywalking.alarm.util
;
import
com.a.eye.skywalking.alarm.model.AlarmType
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
AlarmTypeUtil
{
private
static
Logger
logger
=
LogManager
.
getLogger
(
AlarmTypeUtil
.
class
);
private
static
List
<
AlarmType
>
alarmTypeList
;
static
{
try
{
alarmTypeList
=
new
ArrayList
<
AlarmType
>();
alarmTypeList
.
add
(
new
AlarmType
(
"default"
,
"exception"
,
"System Exception"
));
alarmTypeList
.
add
(
new
AlarmType
(
"ExecuteTime-PossibleError"
,
"remark"
,
"Excution Time > 5s"
));
alarmTypeList
.
add
(
new
AlarmType
(
"ExecuteTime-Warning"
,
"remark"
,
"Excution Time > 500ms"
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"Failed to load alarm type info."
,
e
);
System
.
exit
(-
1
);
}
}
public
static
List
<
AlarmType
>
getAlarmTypeList
()
{
if
(
alarmTypeList
==
null
||
alarmTypeList
.
isEmpty
())
{
alarmTypeList
=
new
ArrayList
<
AlarmType
>();
alarmTypeList
.
add
(
new
AlarmType
(
"default"
,
"exception"
,
"System Exception"
));
alarmTypeList
.
add
(
new
AlarmType
(
"ExecuteTime-PossibleError"
,
"remark"
,
"Excution Time > 5s"
));
alarmTypeList
.
add
(
new
AlarmType
(
"ExecuteTime-Warning"
,
"remark"
,
"Excution Time > 500ms"
));
}
return
alarmTypeList
;
...
...
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/util/RedisUtil.java
浏览文件 @
e04fbee8
...
...
@@ -58,6 +58,6 @@ public class RedisUtil {
}
public
interface
Executable
<
R
>
{
public
R
exe
(
Jedis
client
);
R
exe
(
Jedis
client
);
}
}
skywalking-alarm/src/main/java/com/a/eye/skywalking/alarm/util/TemplateConfigurationUtil.java
浏览文件 @
e04fbee8
...
...
@@ -5,7 +5,6 @@ import java.io.IOException;
import
java.sql.SQLException
;
import
com.a.eye.skywalking.alarm.conf.Config
;
import
com.a.eye.skywalking.alarm.dao.SystemConfigDao
;
import
freemarker.template.Configuration
;
import
freemarker.template.TemplateModelException
;
...
...
skywalking-storage-center/skywalking-routing/bin/routingServer.sh
0 → 100644
浏览文件 @
e04fbee8
#!/bin/sh
ROUTING_HOME
=
`
dirname
"
$0
"
`
/..
ROUTING_CFG_DIR
=
"
${
ROUTING_HOME
}
/config"
ROUTING_LOG_DIR
=
"
${
ROUTING_HOME
}
/logs"
if
[
"
$JAVA_HOME
"
!=
""
]
;
then
JAVA
=
"
$JAVA_HOME
/bin/java"
else
JAVA
=
java
fi
if
[
!
-d
"
${
ROUTING_LOG_DIR
}
"
]
;
then
mkdir
-p
${
ROUTING_LOG_DIR
}
fi
CLASSPATH
=
"
$ROUTING_CFG_DIR
:
$CLASSPATH
"
for
i
in
"
${
ROUTING_HOME
}
"
/libs/
*
.jar
do
CLASSPATH
=
"
$i
:
$CLASSPATH
"
done
echo
"CLASSPATH=
$CLASSPATH
"
$JAVA
${
JAVA_OPTS
}
-classpath
$CLASSPATH
com.a.eye.skywalking.routing.Main
>>
${
ROUTING_HOME
}
/logs/routing-server.log 2>&1&
\ No newline at end of file
skywalking-storage-center/skywalking-routing/pom.xml
浏览文件 @
e04fbee8
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<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>
skywalking-storage-center
</artifactId>
...
...
@@ -18,13 +19,6 @@
</properties>
<dependencies>
<dependency>
<groupId>
org.apache.curator
</groupId>
<artifactId>
curator-test
</artifactId>
<version>
3.2.0
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
...
...
@@ -37,4 +31,39 @@
<version>
2.0-2016
</version>
</dependency>
</dependencies>
<build>
<finalName>
skywalking-routing
</finalName>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-jar-plugin
</artifactId>
<version>
2.3.2
</version>
<configuration>
<excludes>
<exclude>
*.properties
</exclude>
<exclude>
*.xml
</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
make-zip
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
<configuration>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
skywalking-storage-center/skywalking-routing/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
e04fbee8
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id></id>
<formats>
<format>
zip
</format>
</formats>
<dependencySets>
<dependencySet>
<outputDirectory>
/libs
</outputDirectory>
<scope>
runtime
</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>
${project.basedir}/bin
</directory>
<outputDirectory>
/bin
</outputDirectory>
<includes>
<include>
routingServer.sh
</include>
</includes>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
src/main/resources
</directory>
<outputDirectory>
/config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}/${build.finalName}
</directory>
<outputDirectory>
/libs
</outputDirectory>
<includes>
<include>
${build.finalName}.jar
</include>
</includes>
</fileSet>
</fileSets>
</assembly>
skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/Main.java
浏览文件 @
e04fbee8
...
...
@@ -47,7 +47,7 @@ public class Main {
Properties
properties
=
new
Properties
();
try
{
properties
.
load
(
Main
.
class
.
getResourceAsStream
(
"/config.properties"
));
print
Storage
Config
(
properties
);
print
Routing
Config
(
properties
);
ConfigInitializer
.
initialize
(
properties
,
Config
.
class
);
}
catch
(
IllegalAccessException
e
)
{
logger
.
error
(
"Initialize server configuration failure."
,
e
);
...
...
@@ -58,7 +58,7 @@ public class Main {
}
}
private
static
void
print
Storage
Config
(
Properties
config
)
{
private
static
void
print
Routing
Config
(
Properties
config
)
{
for
(
Map
.
Entry
<
Object
,
Object
>
entry
:
config
.
entrySet
())
{
logger
.
info
(
"{} = {}"
,
entry
.
getKey
(),
entry
.
getValue
());
}
...
...
skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/alarm/sender/AlarmMessageSender.java
浏览文件 @
e04fbee8
...
...
@@ -3,6 +3,7 @@ package com.a.eye.skywalking.routing.alarm.sender;
import
com.a.eye.skywalking.logging.api.ILog
;
import
com.a.eye.skywalking.logging.api.LogManager
;
import
com.a.eye.skywalking.routing.config.Config
;
import
redis.clients.jedis.Jedis
;
/**
...
...
@@ -16,6 +17,8 @@ public class AlarmMessageSender {
Jedis
jedis
=
null
;
try
{
jedis
=
AlarmRedisConnector
.
getJedis
();
if
(
jedis
!=
null
)
return
;
jedis
.
hsetnx
(
alarmKey
,
traceId
,
message
);
jedis
.
expire
(
alarmKey
,
Config
.
Alarm
.
ALARM_EXPIRE_SECONDS
);
}
catch
(
Exception
e
)
{
...
...
skywalking-storage-center/skywalking-routing/src/main/java/com/a/eye/skywalking/routing/config/Config.java
浏览文件 @
e04fbee8
...
...
@@ -41,7 +41,7 @@ public class Config {
public
static
String
REDIS_SERVER
=
"127.0.0.1:6379"
;
public
static
boolean
ALARM_OFF_FLAG
=
fals
e
;
public
static
boolean
ALARM_OFF_FLAG
=
tru
e
;
public
static
int
ALARM_EXCEPTION_STACK_LENGTH
=
300
;
...
...
skywalking-storage-center/skywalking-routing/src/main/resources/config.properties
0 → 100644
浏览文件 @
e04fbee8
# the port which routing server listening
server.port
=
23000
#
#search.check_cycle=100
#
#search.timeout=3000
# the type of registry center (default: zookeeper)
#registrycenter.type=zookeeper
# the connect url that registry center
registrycenter.connect_url
=
127.0.0.1:2181
# auth schema that registry center
#registrycenter.auth_schema=
# the auth info that registry center
#registrycenter.auth_info=
#
#registrycenter.path_prefix=/skywalking/routing_list/
#
#storagenode.subscribe_path=/skywalking/storage_list
#
#disruptor.buffer_size=524288
#
#disruptor.flush_size=100
# the connect url for alarm
alarm.redis_server
=
127.0.0.1:6379
#
#alarm.alarm_off_flag=true
#
#alarm.alarm_exception_stack_length=300
#
#alarm.alarm_redis_inspector_interval=100
#
#alarm.redis_max_idle=10
#
#alarm.redis_min_idle=1
#
#alarm.redis_max_total=30
#
#
alarm.alarm_expire_seconds
=
3600000
\ No newline at end of file
skywalking-storage-center/skywalking-routing/src/main/resources/log4j.properties
浏览文件 @
e04fbee8
# logger #
log4j.rootLogger
=
ERROR
,Rolling_File,CONSOLE
log4j.rootLogger
=
INFO
,Rolling_File,CONSOLE
log4j.logger.org.apache
=
OFF
log4j.logger.io.netty
=
OFF
log4j.org.elasticsearch
=
OFF
...
...
skywalking-storage-center/skywalking-storage/bin/storageServer.sh
浏览文件 @
e04fbee8
...
...
@@ -4,7 +4,7 @@ STORAGE_SERVER_BIN="$0"
# Get standard environment variables
STORAGE_SERVER_BIN_DIR
=
`
dirname
"
$STORAGE_SERVER_BIN
"
`
STORAGE_PREFIX
=
"
${
STORAGE_SERVER_BIN_DIR
}
/.."
STORAGE_LOG_DIR
=
"
${
STORAGE_SERVER_BIN_DIR
}
/../log"
STORAGE_LOG_DIR
=
"
${
STORAGE_SERVER_BIN_DIR
}
/../log
s
"
STORAGE_CFG_DIR
=
"
${
STORAGE_SERVER_BIN_DIR
}
/../config"
#echo $STORAGE_SERVER_BIN_DIR
...
...
@@ -15,6 +15,10 @@ else
JAVA
=
java
fi
if
[
!
-d
"
${
STORAGE_LOG_DIR
}
"
]
;
then
mkdir
-p
"
${
STORAGE_LOG_DIR
}
"
fi
CLASSPATH
=
"
$STORAGE_CFG_DIR
:
$CLASSPATH
"
for
i
in
"
${
STORAGE_SERVER_BIN_DIR
}
"
/../lib/
*
.jar
...
...
skywalking-storage-center/skywalking-storage/pom.xml
浏览文件 @
e04fbee8
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
<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"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
...
...
@@ -40,74 +41,25 @@
</dependencies>
<build>
<finalName>
skywalking-storage
</finalName>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.6.0
</version>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
<encoding>
${project.build.sourceEncoding}
</encoding>
</configuration>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-resources-plugin
</artifactId>
<version>
2.6
</version>
<artifactId>
maven-assembly-plugin
</artifactId>
<executions>
<execution>
<id>
copy-resources
</id>
<id>
make-zip
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-resources
</goal>
<goal>
single
</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/install/config
</outputDirectory>
<resources>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
false
</filtering>
</resource>
</resources>
<descriptors>
<descriptor>
src/main/assembly/assembly.xml
</descriptor>
</descriptors>
</configuration>
</execution>
<execution>
<id>
copy-start-script
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-resources
</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/install/bin
</outputDirectory>
<resources>
<resource>
<directory>
bin
</directory>
<filtering>
false
</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>
maven-dependency-plugin
</artifactId>
<executions>
<execution>
<id>
copy-dependencies
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-dependencies
</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>
${project.build.directory}/install/lib
</outputDirectory>
<excludeTransitive>
false
</excludeTransitive>
<stripVersion>
true
</stripVersion>
<includeScope>
runtime
</includeScope>
<includeScope>
compile
</includeScope>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-jar-plugin
</artifactId>
...
...
@@ -116,7 +68,6 @@
<exclude>
*.properties
</exclude>
<exclude>
*.xml
</exclude>
</excludes>
<outputDirectory>
${project.build.directory}/install/lib
</outputDirectory>
</configuration>
</plugin>
<plugin>
...
...
@@ -129,15 +80,11 @@
<phase>
compile
</phase>
<configuration>
<target>
<mkdir
dir=
"${project.build.directory}/install/bin"
/>
<mkdir
dir=
"${project.build.directory}/install/lib"
/>
<mkdir
dir=
"${project.build.directory}/install/logs"
/>
<mkdir
dir=
"${project.build.directory}/install/bin"
/>
<mkdir
dir=
"${project.build.directory}/install/data/index"
/>
<echo
message=
"unzip elastic"
/>
<unzip
src=
"${project.basedir}/lib/dataindex-es-5.0.1.zip"
dest=
"${project.build.directory}/install/data/index"
/>
<chmod
dir=
"${project.build.directory}/install/data/index/bin"
perm=
"ugo+rx"
dest=
"${project.build.directory}/${build.finalName}/data/index"
/>
<chmod
dir=
"${project.build.directory}/${build.finalName}/data/index/bin"
perm=
"ugo+rx"
includes=
"*"
/>
</target>
</configuration>
...
...
@@ -150,22 +97,7 @@
<phase>
pre-clean
</phase>
<configuration>
<target>
<delete
dir=
"${project.build.directory}/install/data/index"
/>
</target>
</configuration>
<goals>
<goal>
run
</goal>
</goals>
</execution>
<execution>
<id>
tar
</id>
<phase>
package
</phase>
<configuration>
<target>
<chmod
dir=
"${project.build.directory}/install/bin"
perm=
"ugo+rx"
includes=
"*"
/>
<tar
destfile=
"${project.build.directory}/install.tar"
basedir=
"${project.build.directory}/install"
>
</tar>
<delete
dir=
"${project.build.directory}/${build.finalName}/data/index"
/>
</target>
</configuration>
<goals>
...
...
skywalking-storage-center/skywalking-storage/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
e04fbee8
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id></id>
<formats>
<format>
zip
</format>
</formats>
<dependencySets>
<dependencySet>
<outputDirectory>
/libs
</outputDirectory>
<scope>
runtime
</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>
${project.basedir}/bin
</directory>
<outputDirectory>
/bin
</outputDirectory>
<includes>
<include>
storageServer.sh
</include>
</includes>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
src/main/resources
</directory>
<outputDirectory>
/config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}/${build.finalName}/data/index
</directory>
<outputDirectory>
/data/index
</outputDirectory>
<fileMode>
0755
</fileMode>
</fileSet>
</fileSets>
</assembly>
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/boot/ElasticBootstrap.java
浏览文件 @
e04fbee8
...
...
@@ -15,7 +15,7 @@ public class ElasticBootstrap {
private
static
ILog
logger
=
LogManager
.
getLogger
(
ElasticBootstrap
.
class
);
public
static
final
String
DATA_INDEX_HOME
=
"DATA_INDEX_HOME"
;
private
static
final
String
DEVELOP_RUNTIME_ELASTIC_HOME
=
ElasticBootstrap
.
class
.
getResource
(
"/"
).
getPath
()
+
".."
+
File
.
separator
+
"
install
"
+
File
.
separator
+
"data"
ElasticBootstrap
.
class
.
getResource
(
"/"
).
getPath
()
+
".."
+
File
.
separator
+
"
skywalking-storage
"
+
File
.
separator
+
"data"
+
File
.
separator
+
"index"
;
private
String
elasticHome
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录