Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gdyjdao
SkyWalking
提交
55dc88f1
S
SkyWalking
项目概览
gdyjdao
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
1
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,发现更多精彩内容 >>
提交
55dc88f1
编写于
11月 11, 2016
作者:
wu-sheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
alter logging module, add logging-api and logging-impl-log4j2.
fix storage module use log incorrectly.
上级
bf5eb139
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
126 addition
and
44 deletion
+126
-44
skywalking-logging/pom.xml
skywalking-logging/pom.xml
+5
-13
skywalking-logging/skywalking-logging-api/pom.xml
skywalking-logging/skywalking-logging-api/pom.xml
+14
-0
skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api/ILog.java
.../src/main/java/com/a/eye/skywalking/logging/api/ILog.java
+1
-1
skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api/LogManager.java
...ain/java/com/a/eye/skywalking/logging/api/LogManager.java
+1
-1
skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api/LogResolver.java
...in/java/com/a/eye/skywalking/logging/api/LogResolver.java
+1
-1
skywalking-logging/skywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api/NoopLogger.java
...ain/java/com/a/eye/skywalking/logging/api/NoopLogger.java
+1
-1
skywalking-logging/skywalking-logging-impl-log4j2/pom.xml
skywalking-logging/skywalking-logging-impl-log4j2/pom.xml
+27
-0
skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/logging/impl/log4j2/Log4j2Logger.java
...om/a/eye/skywalking/logging/impl/log4j2/Log4j2Logger.java
+35
-0
skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/logging/impl/log4j2/Log4j2Resolver.java
.../a/eye/skywalking/logging/impl/log4j2/Log4j2Resolver.java
+15
-0
skywalking-registry/pom.xml
skywalking-registry/pom.xml
+1
-1
skywalking-registry/src/main/java/com/a/eye/skywalking/registry/impl/zookeeper/ZookeeperConfig.java
...e/skywalking/registry/impl/zookeeper/ZookeeperConfig.java
+2
-2
skywalking-registry/src/main/java/com/a/eye/skywalking/registry/impl/zookeeper/ZookeeperRegistryCenter.java
...king/registry/impl/zookeeper/ZookeeperRegistryCenter.java
+2
-2
skywalking-storage-center/skywalking-storage/pom.xml
skywalking-storage-center/skywalking-storage/pom.xml
+10
-9
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/block/index/BlockIndexUpdator.java
...eye/skywalking/storage/block/index/BlockIndexUpdator.java
+4
-5
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/block/index/L1Cache.java
...ava/com/a/eye/skywalking/storage/block/index/L1Cache.java
+4
-4
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/data/IndexDataCapacityMonitor.java
...eye/skywalking/storage/data/IndexDataCapacityMonitor.java
+3
-4
未找到文件。
skywalking-logging/pom.xml
浏览文件 @
55dc88f1
...
...
@@ -8,21 +8,13 @@
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
skywalking-logging
</artifactId>
<packaging>
jar
</packaging>
<packaging>
pom
</packaging>
<name>
skywalking-logging
</name>
<url>
http://maven.apache.org
</url>
<modules>
<module>
skywalking-logging-api
</module>
<module>
skywalking-logging-log4j-impl
</module>
</modules>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
3.8.1
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
skywalking-logging/skywalking-logging-api/pom.xml
0 → 100644
浏览文件 @
55dc88f1
<?xml version="1.0" encoding="UTF-8"?>
<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-logging
</artifactId>
<groupId>
com.a.eye
</groupId>
<version>
2.0-2016
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
skywalking-logging-api
</artifactId>
</project>
skywalking-logging/s
rc/main/java/com/a/eye/skywalking/logging
/ILog.java
→
skywalking-logging/s
kywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api
/ILog.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.logging
;
package
com.a.eye.skywalking.logging
.api
;
/**
* Created by xin on 2016/11/10.
...
...
skywalking-logging/s
rc/main/java/com/a/eye/skywalking/logging
/LogManager.java
→
skywalking-logging/s
kywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api
/LogManager.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.logging
;
package
com.a.eye.skywalking.logging
.api
;
/**
* Created by xin on 2016/11/10.
...
...
skywalking-logging/s
rc/main/java/com/a/eye/skywalking/logging
/LogResolver.java
→
skywalking-logging/s
kywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api
/LogResolver.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.logging
;
package
com.a.eye.skywalking.logging
.api
;
/**
* Created by xin on 2016/11/10.
...
...
skywalking-logging/s
rc/main/java/com/a/eye/skywalking/logging
/NoopLogger.java
→
skywalking-logging/s
kywalking-logging-api/src/main/java/com/a/eye/skywalking/logging/api
/NoopLogger.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.logging
;
package
com.a.eye.skywalking.logging
.api
;
/**
...
...
skywalking-logging/skywalking-logging-impl-log4j2/pom.xml
0 → 100644
浏览文件 @
55dc88f1
<?xml version="1.0" encoding="UTF-8"?>
<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-logging
</artifactId>
<groupId>
com.a.eye
</groupId>
<version>
2.0-2016
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
skywalking-logging-log4j-impl
</artifactId>
<dependencies>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-logging-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-core
</artifactId>
<version>
2.4.1
</version>
</dependency>
</dependencies>
</project>
skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/logging/impl/log4j2/Log4j2Logger.java
0 → 100644
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.logging.impl.log4j2
;
import
com.a.eye.skywalking.logging.api.ILog
;
import
org.apache.logging.log4j.Logger
;
/**
* Created by wusheng on 2016/11/11.
*/
public
class
Log4j2Logger
implements
ILog
{
private
Logger
logger
;
public
Log4j2Logger
(
Logger
logger
)
{
this
.
logger
=
logger
;
}
@Override
public
void
info
(
String
message
)
{
logger
.
info
(
message
);
}
@Override
public
void
info
(
String
message
,
Object
...
arguments
)
{
logger
.
info
(
message
,
arguments
);
}
@Override
public
void
error
(
String
message
,
Throwable
e
)
{
logger
.
error
(
message
,
e
);
}
@Override
public
void
error
(
String
message
,
Object
argument
,
Throwable
e
)
{
logger
.
error
(
message
,
argument
,
e
);
}
}
skywalking-logging/skywalking-logging-impl-log4j2/src/main/java/com/a/eye/skywalking/logging/impl/log4j2/Log4j2Resolver.java
0 → 100644
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.logging.impl.log4j2
;
import
com.a.eye.skywalking.logging.api.ILog
;
import
com.a.eye.skywalking.logging.api.LogResolver
;
import
org.apache.logging.log4j.LogManager
;
/**
* Created by wusheng on 2016/11/11.
*/
public
class
Log4j2Resolver
implements
LogResolver
{
@Override
public
ILog
getLogger
(
Class
<?>
clazz
)
{
return
new
Log4j2Logger
(
LogManager
.
getLogger
(
clazz
));
}
}
skywalking-registry/pom.xml
浏览文件 @
55dc88f1
...
...
@@ -25,7 +25,7 @@
</dependency>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-logging
</artifactId>
<artifactId>
skywalking-logging
-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
...
...
skywalking-registry/src/main/java/com/a/eye/skywalking/registry/impl/zookeeper/ZookeeperConfig.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.registry.impl.zookeeper
;
import
com.a.eye.skywalking.logging.ILog
;
import
com.a.eye.skywalking.logging.LogManager
;
import
com.a.eye.skywalking.logging.
api.
ILog
;
import
com.a.eye.skywalking.logging.
api.
LogManager
;
import
java.util.Properties
;
...
...
skywalking-registry/src/main/java/com/a/eye/skywalking/registry/impl/zookeeper/ZookeeperRegistryCenter.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.registry.impl.zookeeper
;
import
com.a.eye.skywalking.logging.ILog
;
import
com.a.eye.skywalking.logging.LogManager
;
import
com.a.eye.skywalking.logging.
api.
ILog
;
import
com.a.eye.skywalking.logging.
api.
LogManager
;
import
com.a.eye.skywalking.registry.api.*
;
import
org.apache.zookeeper.*
;
...
...
skywalking-storage-center/skywalking-storage/pom.xml
浏览文件 @
55dc88f1
...
...
@@ -16,21 +16,15 @@
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.12
</version>
<scope>
test
</scope>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-network
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-registry
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-core
</artifactId>
<version>
2.4.1
</version>
</dependency>
<dependency>
<groupId>
org.hsqldb
</groupId>
<artifactId>
hsqldb
</artifactId>
...
...
@@ -41,6 +35,13 @@
<artifactId>
data-carrier
</artifactId>
<version>
1.0
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.12
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<build>
<plugins>
...
...
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/block/index/BlockIndexUpdator.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.storage.block.index
;
import
com.a.eye.skywalking.logging.api.ILog
;
import
com.a.eye.skywalking.logging.api.LogManager
;
import
com.a.eye.skywalking.storage.block.index.exception.BlockIndexPersistenceFailedException
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
java.io.*
;
import
java.util.ArrayList
;
...
...
@@ -14,7 +14,7 @@ import static com.a.eye.skywalking.storage.config.Config.BlockIndex.STORAGE_BASE
public
class
BlockIndexUpdator
{
private
static
Logger
logger
=
LogManager
.
getLogger
(
BlockIndexUpdator
.
class
);
private
static
ILog
logger
=
LogManager
.
getLogger
(
BlockIndexUpdator
.
class
);
private
L1Cache
l1Cache
;
private
L2Cache
l2Cache
;
...
...
@@ -64,8 +64,7 @@ public class BlockIndexUpdator {
List
<
Long
>
indexData
=
new
ArrayList
<>();
BufferedReader
indexFileReader
=
null
;
try
{
indexFileReader
=
new
BufferedReader
(
new
FileReader
(
new
File
(
STORAGE_BASE_PATH
,
DATA_FILE_INDEX_FILE_NAME
)));
indexFileReader
=
new
BufferedReader
(
new
FileReader
(
new
File
(
STORAGE_BASE_PATH
,
DATA_FILE_INDEX_FILE_NAME
)));
String
indexDataStr
=
null
;
while
((
indexDataStr
=
indexFileReader
.
readLine
())
!=
null
)
{
indexData
.
add
(
Long
.
parseLong
(
indexDataStr
));
...
...
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/block/index/L1Cache.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.storage.block.index
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Log
ger
;
import
com.a.eye.skywalking.logging.api.ILog
;
import
com.a.eye.skywalking.logging.api.LogMana
ger
;
import
java.util.List
;
import
java.util.TreeSet
;
...
...
@@ -11,13 +11,13 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* 块索引的一级缓存
*
*
<p>
* Created by xin on 2016/11/2.
*/
public
class
L1Cache
{
private
static
final
int
MAX_DATA_KEEP_SIZE
=
30
;
private
static
Logger
logger
=
LogManager
.
getLogger
(
L1Cache
.
class
);
private
static
ILog
logger
=
LogManager
.
getLogger
(
L1Cache
.
class
);
private
TreeSet
<
Long
>
cacheData
=
new
TreeSet
<
Long
>();
private
final
ReadWriteLock
updateLock
=
new
ReentrantReadWriteLock
();
...
...
skywalking-storage-center/skywalking-storage/src/main/java/com/a/eye/skywalking/storage/data/IndexDataCapacityMonitor.java
浏览文件 @
55dc88f1
package
com.a.eye.skywalking.storage.data
;
import
com.a.eye.skywalking.logging.api.ILog
;
import
com.a.eye.skywalking.logging.api.LogManager
;
import
com.a.eye.skywalking.storage.block.index.BlockIndexEngine
;
import
com.a.eye.skywalking.storage.data.index.IndexDBConnector
;
import
org.apache.jute.Index
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
java.sql.SQLException
;
import
java.util.concurrent.atomic.AtomicLong
;
...
...
@@ -16,7 +15,7 @@ import static com.a.eye.skywalking.storage.config.Config.DataIndex.MAX_CAPACITY_
*/
public
class
IndexDataCapacityMonitor
extends
Thread
{
private
static
Logger
logger
=
LogManager
.
getLogger
(
IndexDataCapacityMonitor
.
class
);
private
static
ILog
logger
=
LogManager
.
getLogger
(
IndexDataCapacityMonitor
.
class
);
private
static
Detector
detector
;
public
static
void
addIndexData
(
long
timestamp
,
int
size
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录