Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
a381a6f7
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
a381a6f7
编写于
7月 13, 2017
作者:
wu-sheng
提交者:
GitHub
7月 13, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #289 from ascrutae/zhangxin/feature/datacarrier-independence
independent data carrier project
上级
28b6d8fa
8143a5b0
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
75 addition
and
148 deletion
+75
-148
apm-commons/apm-datacarrier/pom.xml
apm-commons/apm-datacarrier/pom.xml
+14
-0
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/DataCarrier.java
...a/org/skywalking/apm/commons/datacarrier/DataCarrier.java
+7
-7
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/buffer/Buffer.java
...org/skywalking/apm/commons/datacarrier/buffer/Buffer.java
+2
-2
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/buffer/BufferStrategy.java
...alking/apm/commons/datacarrier/buffer/BufferStrategy.java
+1
-1
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/buffer/Channels.java
...g/skywalking/apm/commons/datacarrier/buffer/Channels.java
+2
-2
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/common/AtomicRangeInteger.java
...ng/apm/commons/datacarrier/common/AtomicRangeInteger.java
+1
-1
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/consumer/ConsumerCannotBeCreatedException.java
...atacarrier/consumer/ConsumerCannotBeCreatedException.java
+1
-1
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/consumer/ConsumerPool.java
...alking/apm/commons/datacarrier/consumer/ConsumerPool.java
+3
-3
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/consumer/ConsumerThread.java
...king/apm/commons/datacarrier/consumer/ConsumerThread.java
+2
-2
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/consumer/IConsumer.java
...kywalking/apm/commons/datacarrier/consumer/IConsumer.java
+1
-1
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/partition/IDataPartitioner.java
...g/apm/commons/datacarrier/partition/IDataPartitioner.java
+1
-1
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/partition/ProducerThreadPartitioner.java
...mons/datacarrier/partition/ProducerThreadPartitioner.java
+1
-1
apm-commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons/datacarrier/partition/SimpleRollingPartitioner.java
...mmons/datacarrier/partition/SimpleRollingPartitioner.java
+1
-1
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/DataCarrierTest.java
...g/skywalking/apm/commons/datacarrier/DataCarrierTest.java
+9
-10
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/SampleData.java
...va/org/skywalking/apm/commons/datacarrier/SampleData.java
+1
-1
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/common/AtomicRangeIntegerTest.java
...pm/commons/datacarrier/common/AtomicRangeIntegerTest.java
+4
-2
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/consumer/ConsumerPoolTest.java
...ng/apm/commons/datacarrier/consumer/ConsumerPoolTest.java
+5
-5
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/consumer/ConsumerTest.java
...alking/apm/commons/datacarrier/consumer/ConsumerTest.java
+3
-3
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/consumer/SampleConsumer.java
...king/apm/commons/datacarrier/consumer/SampleConsumer.java
+2
-3
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/partition/ProducerThreadPartitionerTest.java
.../datacarrier/partition/ProducerThreadPartitionerTest.java
+3
-3
apm-commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons/datacarrier/partition/SimpleRollingPartitionerTest.java
...s/datacarrier/partition/SimpleRollingPartitionerTest.java
+2
-2
apm-commons/apm-logging-log4j2/src/main/java/org/skywalking/apm/logging/log4j2/Log4j2Logger.java
.../java/org/skywalking/apm/logging/log4j2/Log4j2Logger.java
+0
-76
apm-commons/apm-logging-log4j2/src/main/java/org/skywalking/apm/logging/log4j2/Log4j2Resolver.java
...ava/org/skywalking/apm/logging/log4j2/Log4j2Resolver.java
+0
-16
apm-commons/pom.xml
apm-commons/pom.xml
+1
-1
apm-sniffer/apm-agent-core/pom.xml
apm-sniffer/apm-agent-core/pom.xml
+5
-0
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/remote/TraceSegmentServiceClient.java
...king/apm/agent/core/remote/TraceSegmentServiceClient.java
+3
-3
未找到文件。
apm-commons/apm-
logging-log4j2
/pom.xml
→
apm-commons/apm-
datacarrier
/pom.xml
浏览文件 @
a381a6f7
...
@@ -9,23 +9,6 @@
...
@@ -9,23 +9,6 @@
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
apm-
logging-log4j2
</artifactId>
<artifactId>
apm-
datacarrier
</artifactId>
<dependencies>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
apm-logging-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-core
</artifactId>
<version>
2.8
</version>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-api
</artifactId>
<version>
2.8
</version>
</dependency>
</dependencies>
</project>
</project>
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/DataCarrier.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/DataCarrier.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier
;
package
org.skywalking.apm.
commons
.datacarrier
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.Channels
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.Channels
;
import
org.skywalking.apm.
agent.core
.datacarrier.consumer.ConsumerPool
;
import
org.skywalking.apm.
commons
.datacarrier.consumer.ConsumerPool
;
import
org.skywalking.apm.
agent.core
.datacarrier.consumer.IConsumer
;
import
org.skywalking.apm.
commons
.datacarrier.consumer.IConsumer
;
import
org.skywalking.apm.
agent.core
.datacarrier.partition.IDataPartitioner
;
import
org.skywalking.apm.
commons
.datacarrier.partition.IDataPartitioner
;
import
org.skywalking.apm.
agent.core
.datacarrier.partition.SimpleRollingPartitioner
;
import
org.skywalking.apm.
commons
.datacarrier.partition.SimpleRollingPartitioner
;
/**
/**
* DataCarrier main class.
* DataCarrier main class.
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/buffer/Buffer.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/buffer/Buffer.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.buffer
;
package
org.skywalking.apm.
commons
.datacarrier.buffer
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
org.skywalking.apm.
agent.core
.datacarrier.common.AtomicRangeInteger
;
import
org.skywalking.apm.
commons
.datacarrier.common.AtomicRangeInteger
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/buffer/BufferStrategy.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/buffer/BufferStrategy.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.buffer
;
package
org.skywalking.apm.
commons
.datacarrier.buffer
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/buffer/Channels.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/buffer/Channels.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.buffer
;
package
org.skywalking.apm.
commons
.datacarrier.buffer
;
import
org.skywalking.apm.
agent.core
.datacarrier.partition.IDataPartitioner
;
import
org.skywalking.apm.
commons
.datacarrier.partition.IDataPartitioner
;
/**
/**
* Channels of Buffer
* Channels of Buffer
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/common/AtomicRangeInteger.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/common/AtomicRangeInteger.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.common
;
package
org.skywalking.apm.
commons
.datacarrier.common
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/consumer/ConsumerCannotBeCreatedException.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/consumer/ConsumerCannotBeCreatedException.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.consumer
;
package
org.skywalking.apm.
commons
.datacarrier.consumer
;
/**
/**
* Created by wusheng on 2016/11/15.
* Created by wusheng on 2016/11/15.
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/consumer/ConsumerPool.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/consumer/ConsumerPool.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.consumer
;
package
org.skywalking.apm.
commons
.datacarrier.consumer
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.concurrent.locks.ReentrantLock
;
import
java.util.concurrent.locks.ReentrantLock
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.Buffer
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.Buffer
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.Channels
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.Channels
;
/**
/**
* Pool of consumers
* Pool of consumers
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/consumer/ConsumerThread.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/consumer/ConsumerThread.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.consumer
;
package
org.skywalking.apm.
commons
.datacarrier.consumer
;
import
java.util.LinkedList
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.List
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.Buffer
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.Buffer
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/consumer/IConsumer.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/consumer/IConsumer.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.consumer
;
package
org.skywalking.apm.
commons
.datacarrier.consumer
;
import
java.util.List
;
import
java.util.List
;
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/partition/IDataPartitioner.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/partition/IDataPartitioner.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.partition
;
package
org.skywalking.apm.
commons
.datacarrier.partition
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/partition/ProducerThreadPartitioner.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/partition/ProducerThreadPartitioner.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.partition
;
package
org.skywalking.apm.
commons
.datacarrier.partition
;
/**
/**
* use threadid % total to partition
* use threadid % total to partition
...
...
apm-
sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core
/datacarrier/partition/SimpleRollingPartitioner.java
→
apm-
commons/apm-datacarrier/src/main/java/org/skywalking/apm/commons
/datacarrier/partition/SimpleRollingPartitioner.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.partition
;
package
org.skywalking.apm.
commons
.datacarrier.partition
;
/**
/**
* use normal int to rolling.
* use normal int to rolling.
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/DataCarrierTest.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/DataCarrierTest.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.agent.core.datacarrier
;
package
org.skywalking.apm.commons.datacarrier
;
import
org.skywalking.apm.agent.core.datacarrier.buffer.Buffer
;
import
java.util.List
;
import
org.skywalking.apm.agent.core.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.agent.core.datacarrier.buffer.Channels
;
import
org.skywalking.apm.agent.core.datacarrier.consumer.IConsumer
;
import
org.skywalking.apm.agent.core.datacarrier.partition.ProducerThreadPartitioner
;
import
org.skywalking.apm.agent.core.datacarrier.partition.SimpleRollingPartitioner
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.powermock.api.support.membermodification.MemberModifier
;
import
org.powermock.api.support.membermodification.MemberModifier
;
import
org.skywalking.apm.commons.datacarrier.buffer.Buffer
;
import
java.util.List
;
import
org.skywalking.apm.commons.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.commons.datacarrier.buffer.Channels
;
import
org.skywalking.apm.commons.datacarrier.consumer.IConsumer
;
import
org.skywalking.apm.commons.datacarrier.partition.ProducerThreadPartitioner
;
import
org.skywalking.apm.commons.datacarrier.partition.SimpleRollingPartitioner
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/SampleData.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/SampleData.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier
;
package
org.skywalking.apm.
commons
.datacarrier
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/common/AtomicRangeIntegerTest.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/common/AtomicRangeIntegerTest.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.common
;
package
org.skywalking.apm.
commons
.datacarrier.common
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
/**
/**
* Created by
wusheng on 2016/10/25
.
* Created by
xin on 2017/7/14
.
*/
*/
public
class
AtomicRangeIntegerTest
{
public
class
AtomicRangeIntegerTest
{
@Test
@Test
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/consumer/ConsumerPoolTest.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/consumer/ConsumerPoolTest.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.consumer
;
package
org.skywalking.apm.
commons
.datacarrier.consumer
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.powermock.api.support.membermodification.MemberModifier
;
import
org.powermock.api.support.membermodification.MemberModifier
;
import
org.skywalking.apm.
agent.core
.datacarrier.SampleData
;
import
org.skywalking.apm.
commons
.datacarrier.SampleData
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.Channels
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.Channels
;
import
org.skywalking.apm.
agent.core
.datacarrier.partition.SimpleRollingPartitioner
;
import
org.skywalking.apm.
commons
.datacarrier.partition.SimpleRollingPartitioner
;
/**
/**
* Created by wusheng on 2016/10/26.
* Created by wusheng on 2016/10/26.
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/consumer/ConsumerTest.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/consumer/ConsumerTest.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.consumer
;
package
org.skywalking.apm.
commons
.datacarrier.consumer
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.HashSet
;
...
@@ -7,8 +7,8 @@ import java.util.concurrent.LinkedBlockingQueue;
...
@@ -7,8 +7,8 @@ import java.util.concurrent.LinkedBlockingQueue;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.powermock.api.support.membermodification.MemberModifier
;
import
org.powermock.api.support.membermodification.MemberModifier
;
import
org.skywalking.apm.
agent.core
.datacarrier.DataCarrier
;
import
org.skywalking.apm.
commons
.datacarrier.DataCarrier
;
import
org.skywalking.apm.
agent.core
.datacarrier.SampleData
;
import
org.skywalking.apm.
commons
.datacarrier.SampleData
;
/**
/**
* Created by wusheng on 2016/10/26.
* Created by wusheng on 2016/10/26.
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/consumer/SampleConsumer.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/consumer/SampleConsumer.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.agent.core.datacarrier.consumer
;
package
org.skywalking.apm.commons.datacarrier.consumer
;
import
java.util.List
;
import
java.util.List
;
import
org.skywalking.apm.
agent.core
.datacarrier.SampleData
;
import
org.skywalking.apm.
commons
.datacarrier.SampleData
;
/**
/**
* Created by wusheng on 2016/10/26.
* Created by wusheng on 2016/10/26.
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/partition/ProducerThreadPartitionerTest.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/partition/ProducerThreadPartitionerTest.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.partition
;
package
org.skywalking.apm.
commons
.datacarrier.partition
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.skywalking.apm.
agent.core
.datacarrier.SampleData
;
import
org.skywalking.apm.
commons
.datacarrier.SampleData
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
*/
*/
public
class
ProducerThreadPartitionerTest
{
public
class
ProducerThreadPartitionerTest
{
@Test
@Test
public
void
testPartition
(){
public
void
testPartition
()
{
int
partitionNum
=
(
int
)
Thread
.
currentThread
().
getId
()
%
10
;
int
partitionNum
=
(
int
)
Thread
.
currentThread
().
getId
()
%
10
;
ProducerThreadPartitioner
<
SampleData
>
partitioner
=
new
ProducerThreadPartitioner
<
SampleData
>();
ProducerThreadPartitioner
<
SampleData
>
partitioner
=
new
ProducerThreadPartitioner
<
SampleData
>();
Assert
.
assertEquals
(
partitioner
.
partition
(
10
,
new
SampleData
()),
partitionNum
);
Assert
.
assertEquals
(
partitioner
.
partition
(
10
,
new
SampleData
()),
partitionNum
);
...
...
apm-
sniffer/apm-agent-core/src/test/java/org/skywalking/apm/agent/core
/datacarrier/partition/SimpleRollingPartitionerTest.java
→
apm-
commons/apm-datacarrier/src/test/java/org/skywalking/apm/commons
/datacarrier/partition/SimpleRollingPartitionerTest.java
浏览文件 @
a381a6f7
package
org.skywalking.apm.
agent.core
.datacarrier.partition
;
package
org.skywalking.apm.
commons
.datacarrier.partition
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.junit.Test
;
import
org.skywalking.apm.
agent.core
.datacarrier.SampleData
;
import
org.skywalking.apm.
commons
.datacarrier.SampleData
;
/**
/**
* Created by wusheng on 2016/10/25.
* Created by wusheng on 2016/10/25.
...
...
apm-commons/apm-logging-log4j2/src/main/java/org/skywalking/apm/logging/log4j2/Log4j2Logger.java
已删除
100644 → 0
浏览文件 @
28b6d8fa
package
org.skywalking.apm.logging.log4j2
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.skywalking.apm.logging.ILog
;
/**
* @author wusheng
*/
public
class
Log4j2Logger
implements
ILog
{
private
Logger
delegateLogger
;
Log4j2Logger
(
Class
<?>
targetClass
)
{
delegateLogger
=
LogManager
.
getFormatterLogger
(
targetClass
);
}
@Override
public
void
info
(
String
format
)
{
delegateLogger
.
info
(
format
);
}
@Override
public
void
info
(
String
format
,
Object
...
arguments
)
{
delegateLogger
.
info
(
format
,
arguments
);
}
@Override
public
void
warn
(
String
format
,
Object
...
arguments
)
{
delegateLogger
.
warn
(
format
,
arguments
);
}
@Override
public
void
error
(
String
format
,
Throwable
e
)
{
delegateLogger
.
error
(
format
,
e
);
}
@Override
public
void
error
(
Throwable
e
,
String
format
,
Object
...
arguments
)
{
delegateLogger
.
error
(
format
,
e
,
arguments
);
}
@Override
public
boolean
isDebugEnable
()
{
return
delegateLogger
.
isDebugEnabled
();
}
@Override
public
boolean
isInfoEnable
()
{
return
delegateLogger
.
isInfoEnabled
();
}
@Override
public
boolean
isWarnEnable
()
{
return
delegateLogger
.
isWarnEnabled
();
}
@Override
public
boolean
isErrorEnable
()
{
return
delegateLogger
.
isErrorEnabled
();
}
@Override
public
void
debug
(
String
format
)
{
delegateLogger
.
debug
(
format
);
}
@Override
public
void
debug
(
String
format
,
Object
...
arguments
)
{
delegateLogger
.
debug
(
format
,
arguments
);
}
@Override
public
void
error
(
String
format
)
{
delegateLogger
.
error
(
format
);
}
}
apm-commons/apm-logging-log4j2/src/main/java/org/skywalking/apm/logging/log4j2/Log4j2Resolver.java
已删除
100644 → 0
浏览文件 @
28b6d8fa
package
org.skywalking.apm.logging.log4j2
;
import
org.skywalking.apm.logging.ILog
;
import
org.skywalking.apm.logging.LogResolver
;
/**
* The <code>LogResolver</code> is an implementation of {@link LogResolver},
*
* @author wusheng
*/
public
class
Log4j2Resolver
implements
LogResolver
{
@Override
public
ILog
getLogger
(
Class
<?>
clazz
)
{
return
new
Log4j2Logger
(
clazz
);
}
}
apm-commons/pom.xml
浏览文件 @
a381a6f7
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<modules>
<modules>
<module>
apm-util
</module>
<module>
apm-util
</module>
<module>
apm-logging-api
</module>
<module>
apm-logging-api
</module>
<module>
apm-
logging-log4j2
</module>
<module>
apm-
datacarrier
</module>
</modules>
</modules>
<name>
apm-commons
</name>
<name>
apm-commons
</name>
...
...
apm-sniffer/apm-agent-core/pom.xml
浏览文件 @
a381a6f7
...
@@ -95,6 +95,11 @@
...
@@ -95,6 +95,11 @@
</exclusions>
</exclusions>
<scope>
test
</scope>
<scope>
test
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
apm-datacarrier
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
<extensions>
<extensions>
...
...
apm-sniffer/apm-agent-core/src/main/java/org/skywalking/apm/agent/core/remote/TraceSegmentServiceClient.java
浏览文件 @
a381a6f7
...
@@ -8,9 +8,9 @@ import org.skywalking.apm.agent.core.boot.ServiceManager;
...
@@ -8,9 +8,9 @@ import org.skywalking.apm.agent.core.boot.ServiceManager;
import
org.skywalking.apm.agent.core.context.TracingContext
;
import
org.skywalking.apm.agent.core.context.TracingContext
;
import
org.skywalking.apm.agent.core.context.TracingContextListener
;
import
org.skywalking.apm.agent.core.context.TracingContextListener
;
import
org.skywalking.apm.agent.core.context.trace.TraceSegment
;
import
org.skywalking.apm.agent.core.context.trace.TraceSegment
;
import
org.skywalking.apm.
agent.core
.datacarrier.DataCarrier
;
import
org.skywalking.apm.
commons
.datacarrier.DataCarrier
;
import
org.skywalking.apm.
agent.core
.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.
commons
.datacarrier.buffer.BufferStrategy
;
import
org.skywalking.apm.
agent.core
.datacarrier.consumer.IConsumer
;
import
org.skywalking.apm.
commons
.datacarrier.consumer.IConsumer
;
import
org.skywalking.apm.logging.ILog
;
import
org.skywalking.apm.logging.ILog
;
import
org.skywalking.apm.logging.LogManager
;
import
org.skywalking.apm.logging.LogManager
;
import
org.skywalking.apm.network.proto.Downstream
;
import
org.skywalking.apm.network.proto.Downstream
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录