Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
javalover123888
SkyWalking
提交
8c87939d
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,发现更多精彩内容 >>
提交
8c87939d
编写于
9月 04, 2017
作者:
P
pengys5
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Package and shell
上级
30a25c8a
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
202 addition
and
2 deletion
+202
-2
apm-collector/apm-collector-boot/bin/collector-service.bat
apm-collector/apm-collector-boot/bin/collector-service.bat
+20
-0
apm-collector/apm-collector-boot/bin/collector-service.sh
apm-collector/apm-collector-boot/bin/collector-service.sh
+37
-0
apm-collector/apm-collector-boot/bin/startup.bat
apm-collector/apm-collector-boot/bin/startup.bat
+5
-0
apm-collector/apm-collector-boot/bin/startup.sh
apm-collector/apm-collector-boot/bin/startup.sh
+7
-0
apm-collector/apm-collector-boot/pom.xml
apm-collector/apm-collector-boot/pom.xml
+76
-0
apm-collector/apm-collector-boot/src/main/assembly/assembly.xml
...llector/apm-collector-boot/src/main/assembly/assembly.xml
+42
-0
apm-collector/apm-collector-boot/src/main/resources/logback.xml
...llector/apm-collector-boot/src/main/resources/logback.xml
+11
-0
apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/util/DefinitionLoader.java
.../skywalking/apm/collector/core/util/DefinitionLoader.java
+4
-2
未找到文件。
apm-collector/apm-collector-boot/bin/collector-service.bat
0 → 100755
浏览文件 @
8c87939d
@echo
off
setlocal
set
COLLECOTR_PROCESS_TITLE
=
Skywalking
-Collector
set
COLLECTOR_BASE_PATH
=
%~dp0
%
..
set
COLLECTOR_RUNTIME_OPTIONS
=
"-Xms256M -Xmx512M"
set
CLASSPATH
=
%COLLECTOR_BASE_PATH%
\config
;
SET
CLASSPATH
=
%COLLECTOR_BASE_PATH%
\libs\
*;
%CLASSPATH%
if
""
%JAVA_HOME%
""
==
""""
(
set
_EXECJAVA
=
java
)
else
(
set
_EXECJAVA
=
"
%JAVA_HOME%
"
/bin/java
)
start
/MIN
"
%COLLECOTR_PROCESS_TITLE%
"
%_EXECJAVA%
"
%COLLECTOR_RUNTIME_OPTIONS%
"
-cp
"
%CLASSPATH%
"
org
.skywalking.apm.collector.boot.CollectorBootStartUp
&
echo
Collector
started
successfully
!
endlocal
\ No newline at end of file
apm-collector/apm-collector-boot/bin/collector-service.sh
0 → 100755
浏览文件 @
8c87939d
#!/usr/bin/env bash
PRG
=
"
$0
"
PRGDIR
=
`
dirname
"
$PRG
"
`
[
-z
"
$COLLECTOR_HOME
"
]
&&
COLLECTOR_HOME
=
`
cd
"
$PRGDIR
/.."
>
/dev/null
;
pwd
`
COLLECTOR_LOGS_DIR
=
"
${
COLLECTOR_HOME
}
/logs"
JAVA_OPTS
=
" -Xms256M -Xmx512M"
if
[
!
-d
"
${
COLLECTOR_HOME
}
/logs"
]
;
then
mkdir
-p
"
${
COLLECTOR_LOGS_DIR
}
"
fi
_RUNJAVA
=
${
JAVA_HOME
}
/bin/java
[
-z
"
$JAVA_HOME
"
]
&&
_RUNJAVA
=
`
java
`
CLASSPATH
=
"
$COLLECTOR_HOME
/config:
$CLASSPATH
"
for
i
in
"
$COLLECTOR_HOME
"
/libs/
*
.jar
do
CLASSPATH
=
"
$i
:
$CLASSPATH
"
done
echo
"Starting collector...."
eval exec
"
\"
$_RUNJAVA
\"
${
JAVA_OPTS
}
-classpath
$CLASSPATH
org.skywalking.apm.collector.boot.CollectorBootStartUp
\
2>
${
COLLECTOR_LOGS_DIR
}
/collector.log 1> /dev/null &"
retval
=
$?
pid
=
$!
FAIL_MSG
=
"Collector started failure!"
SUCCESS_MSG
=
"Collector started successfully!"
[
${
retval
}
-eq
0
]
||
(
echo
${
FAIL_MSG
}
;
exit
${
retval
}
)
sleep
1
if
!
ps
-p
${
pid
}
>
/dev/null
;
then
echo
${
FAIL_MSG
}
exit
1
fi
echo
${
SUCCESS_MSG
}
\ No newline at end of file
apm-collector/apm-collector-boot/bin/startup.bat
0 → 100755
浏览文件 @
8c87939d
@echo
off
setlocal
call
"
%~dp0
"
\collector
-service
.bat
start
endlocal
\ No newline at end of file
apm-collector/apm-collector-boot/bin/startup.sh
0 → 100755
浏览文件 @
8c87939d
#!/usr/bin/env bash
PRG
=
"
$0
"
PRGDIR
=
`
dirname
"
$PRG
"
`
EXECUTABLE
=
collector-service.sh
exec
"
$PRGDIR
"
/
"
$EXECUTABLE
"
start
\ No newline at end of file
apm-collector/apm-collector-boot/pom.xml
浏览文件 @
8c87939d
...
...
@@ -12,6 +12,13 @@
<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/${artifactId}
</docker.image.name>
<docker.image.version>
${version}
</docker.image.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.skywalking
</groupId>
...
...
@@ -54,4 +61,73 @@
<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>
</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.build.directory}
</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
apm-collector/apm-collector-boot/src/main/assembly/assembly.xml
0 → 100644
浏览文件 @
8c87939d
<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>
tar.gz
</format>
<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>
*.sh
</include>
<include>
*.bat
</include>
</includes>
<fileMode>
0755
</fileMode>
</fileSet>
<fileSet>
<directory>
src/main/resources
</directory>
<includes>
<include>
application.yml
</include>
<include>
logback.xml
</include>
</includes>
<outputDirectory>
/config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}
</directory>
<outputDirectory>
/libs
</outputDirectory>
<includes>
<include>
${build.finalName}.jar
</include>
</includes>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
apm-collector/apm-collector-boot/src/main/resources/logback.xml
浏览文件 @
8c87939d
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property
name=
"LOG_PATH"
value=
"../logs"
/>
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<layout
class=
"ch.qos.logback.classic.PatternLayout"
>
<Pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</layout>
</appender>
<appender
name=
"FILE"
class=
"ch.qos.logback.core.FileAppender"
>
<file>
${LOG_PATH}/skywalking-server-log4j2.log
</file>
<append>
true
</append>
<immediateFlush>
true
</immediateFlush>
<encoder>
<Pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</Pattern>
</encoder>
</appender>
<logger
name=
"org.skywalking.apm.collector.agentstream.worker.storage.PersistenceTimer"
level=
"INFO"
/>
<logger
name=
"org.eclipse.jetty"
level=
"INFO"
/>
...
...
@@ -12,5 +22,6 @@
<root
level=
"debug"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"FILE"
/>
</root>
</configuration>
\ No newline at end of file
apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/util/DefinitionLoader.java
浏览文件 @
8c87939d
package
org.skywalking.apm.collector.core.util
;
import
java.io.
File
Reader
;
import
java.io.
Buffered
Reader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.net.URL
;
import
java.util.Enumeration
;
import
java.util.Iterator
;
...
...
@@ -41,7 +42,8 @@ public class DefinitionLoader<D> implements Iterable<D> {
while
(
urlEnumeration
.
hasMoreElements
())
{
URL
definitionFileURL
=
urlEnumeration
.
nextElement
();
logger
.
info
(
"definition file url: {}"
,
definitionFileURL
.
getPath
());
properties
.
load
(
new
FileReader
(
definitionFileURL
.
getPath
()));
BufferedReader
bufferedReader
=
new
BufferedReader
(
new
InputStreamReader
(
definitionFileURL
.
openStream
()));
properties
.
load
(
bufferedReader
);
Enumeration
defineItem
=
properties
.
propertyNames
();
while
(
defineItem
.
hasMoreElements
())
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录