Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿信在这里
SkyWalking
提交
dd5ce743
S
SkyWalking
项目概览
阿信在这里
/
SkyWalking
与 Fork 源项目一致
Fork自
山不在高_有仙则灵 / 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,发现更多精彩内容 >>
提交
dd5ce743
编写于
2月 23, 2017
作者:
P
pengys5
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
actor provider
上级
c82ad286
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
203 addition
and
12 deletion
+203
-12
skywalking-collector/pom.xml
skywalking-collector/pom.xml
+7
-5
skywalking-collector/skywalking-collector-cluster/pom.xml
skywalking-collector/skywalking-collector-cluster/pom.xml
+5
-0
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/base/AbstractUntypedActor.java
...ywalking/collector/cluster/base/AbstractUntypedActor.java
+10
-0
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/base/IActorProvider.java
...eye/skywalking/collector/cluster/base/IActorProvider.java
+15
-0
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/config/CollectorConfig.java
.../skywalking/collector/cluster/config/CollectorConfig.java
+4
-0
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/config/CollectorConfigInitializer.java
.../collector/cluster/config/CollectorConfigInitializer.java
+0
-1
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/manager/ActorCreator.java
...ye/skywalking/collector/cluster/manager/ActorCreator.java
+20
-0
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/manager/ActorManagerActor.java
...ywalking/collector/cluster/manager/ActorManagerActor.java
+3
-2
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/manager/ActorManagerActorFactory.java
...g/collector/cluster/manager/ActorManagerActorFactory.java
+29
-0
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/producer/TraceProducerApp.java
...ywalking/collector/cluster/producer/TraceProducerApp.java
+1
-1
skywalking-collector/skywalking-collector-cluster/src/main/resources/META-INF/services/com.a.eye.skywalking.collector.cluster.base.IActorProvider
...om.a.eye.skywalking.collector.cluster.base.IActorProvider
+1
-0
skywalking-collector/skywalking-collector-cluster/src/test/java/com/a/eye/skywalking/collector/cluster/ActorCreatorTestCase.java
...ye/skywalking/collector/cluster/ActorCreatorTestCase.java
+22
-0
skywalking-collector/skywalking-collector-cluster/src/test/java/com/a/eye/skywalking/collector/cluster/ActorProviderTestCase.java
...e/skywalking/collector/cluster/ActorProviderTestCase.java
+27
-0
skywalking-collector/skywalking-collector-cluster/src/test/java/com/a/eye/skywalking/collector/cluster/CollectorConfigTestCase.java
...skywalking/collector/cluster/CollectorConfigTestCase.java
+0
-2
skywalking-collector/skywalking-collector-worker/pom.xml
skywalking-collector/skywalking-collector-worker/pom.xml
+7
-1
skywalking-collector/skywalking-collector-worker/src/main/java/com/a/eye/skywalking/collector/worker/CollectorBootStartUp.java
...eye/skywalking/collector/worker/CollectorBootStartUp.java
+17
-0
skywalking-collector/skywalking-collector-worker/src/main/java/com/a/eye/skywalking/collector/worker/indicator/ApplicationDiscoverActor.java
.../collector/worker/indicator/ApplicationDiscoverActor.java
+22
-0
skywalking-collector/skywalking-collector-worker/src/main/java/com/a/eye/skywalking/collector/worker/indicator/TraceSegmentRelationActor.java
...collector/worker/indicator/TraceSegmentRelationActor.java
+13
-0
未找到文件。
skywalking-collector/pom.xml
浏览文件 @
dd5ce743
...
...
@@ -19,11 +19,6 @@
</properties>
<dependencies>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-sniffer-mock
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
com.typesafe.akka
</groupId>
<artifactId>
akka-cluster_2.11
</artifactId>
...
...
@@ -49,5 +44,12 @@
<artifactId>
leveldb
</artifactId>
<version>
0.9
</version>
</dependency>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-sniffer-mock
</artifactId>
<version>
${project.version}
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
</project>
skywalking-collector/skywalking-collector-cluster/pom.xml
浏览文件 @
dd5ce743
...
...
@@ -27,5 +27,10 @@
<artifactId>
spring-context-support
</artifactId>
<version>
${project.spring.version}
</version>
</dependency>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-api
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/base/AbstractUntypedActor.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster.base
;
import
akka.actor.ActorSystem
;
import
akka.actor.UntypedActor
;
/**
* @author pengys5
*/
public
abstract
class
AbstractUntypedActor
extends
UntypedActor
{
}
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/base/IActorProvider.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster.base
;
import
akka.actor.ActorSystem
;
import
com.a.eye.skywalking.collector.cluster.config.CollectorConfig
;
/**
* @author pengys5
*/
public
interface
IActorProvider
{
public
String
actorName
();
public
void
createActor
(
ActorSystem
system
);
public
void
actorOf
(
ActorSystem
system
,
String
actorInClusterName
);
}
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/config/CollectorConfig.java
浏览文件 @
dd5ce743
...
...
@@ -11,5 +11,9 @@ public class CollectorConfig {
public
static
String
hostname
=
"127.0.0.1"
;
public
static
String
port
=
"2551"
;
public
static
String
cluster
=
"127.0.0.1:2551"
;
public
static
class
Actor
{
public
static
int
ActorManagerActor_Num
=
2
;
}
}
}
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/config/CollectorConfigInitializer.java
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster.config
;
import
com.a.eye.skywalking.api.conf.Config
;
import
com.a.eye.skywalking.api.logging.api.ILog
;
import
com.a.eye.skywalking.api.logging.api.LogManager
;
import
com.a.eye.skywalking.api.util.ConfigInitializer
;
...
...
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/manager/ActorCreator.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster.manager
;
import
akka.actor.ActorSystem
;
import
com.a.eye.skywalking.collector.cluster.base.IActorProvider
;
import
java.util.ServiceLoader
;
/**
* @author pengys5
*/
public
enum
ActorCreator
{
INSTANCE
;
public
void
create
(
ActorSystem
system
)
{
ServiceLoader
<
IActorProvider
>
serviceLoader
=
ServiceLoader
.
load
(
IActorProvider
.
class
);
for
(
IActorProvider
service
:
serviceLoader
)
{
service
.
createActor
(
system
);
}
}
}
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/manager/ActorManagerActor.java
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster.manager
;
import
akka.actor.Terminated
;
import
akka.actor.UntypedActor
;
import
com.a.eye.skywalking.collector.cluster.base.AbstractUntypedActor
;
import
com.a.eye.skywalking.collector.cluster.base.IActorProvider
;
import
com.a.eye.skywalking.collector.cluster.message.ActorRegisterMessage
;
/**
* Created by Administrator on 2017/2/21 0021.
*/
public
class
ActorManagerActor
extends
UntypedActor
{
public
class
ActorManagerActor
extends
Abstract
UntypedActor
{
@Override
public
void
onReceive
(
Object
message
)
throws
Throwable
{
...
...
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/manager/ActorManagerActorFactory.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster.manager
;
import
akka.actor.ActorSystem
;
import
akka.actor.Props
;
import
com.a.eye.skywalking.collector.cluster.base.IActorProvider
;
import
com.a.eye.skywalking.collector.cluster.config.CollectorConfig
;
/**
* @author pengys5
*/
public
class
ActorManagerActorFactory
implements
IActorProvider
{
@Override
public
String
actorName
()
{
return
"ActorManagerActor"
;
}
@Override
public
void
createActor
(
ActorSystem
system
)
{
for
(
int
i
=
1
;
i
<=
CollectorConfig
.
Collector
.
Actor
.
ActorManagerActor_Num
;
i
++)
{
actorOf
(
system
,
actorName
()
+
"_"
+
i
);
}
}
@Override
public
void
actorOf
(
ActorSystem
system
,
String
actorInClusterName
)
{
system
.
actorOf
(
Props
.
create
(
ActorManagerActor
.
class
),
actorInClusterName
);
}
}
skywalking-collector/skywalking-collector-cluster/src/main/java/com/a/eye/skywalking/collector/cluster/producer/TraceProducerApp.java
浏览文件 @
dd5ce743
...
...
@@ -22,7 +22,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import
static
akka
.
pattern
.
Patterns
.
ask
;
/**
* {@link TraceProducerApp} is a producer for trace agent to send
@link TraceSegment
.
* {@link TraceProducerApp} is a producer for trace agent to send
{@link TraceSegment}
.
* <p>
* Created by pengys5 on 2017/2/17.
*/
...
...
skywalking-collector/skywalking-collector-cluster/src/main/resources/META-INF/services/com.a.eye.skywalking.collector.cluster.base.IActorProvider
0 → 100644
浏览文件 @
dd5ce743
com.a.eye.skywalking.collector.cluster.manager.ActorManagerActorFactory
\ No newline at end of file
skywalking-collector/skywalking-collector-cluster/src/test/java/com/a/eye/skywalking/collector/cluster/ActorCreatorTestCase.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster
;
import
akka.actor.ActorSystem
;
import
akka.actor.Props
;
import
com.a.eye.skywalking.collector.cluster.manager.ActorCreator
;
import
com.a.eye.skywalking.collector.cluster.manager.ActorManagerActor
;
import
org.junit.Test
;
import
static
org
.
mockito
.
Mockito
.*;
/**
* @author pengys5
*/
public
class
ActorCreatorTestCase
{
@Test
public
void
testCreate
()
{
ActorSystem
system
=
mock
(
ActorSystem
.
class
);
// ActorCreator.INSTANCE.create(system, ActorManagerActor.class, 1);
// verify(system).actorOf(Props.create(ActorManagerActor.class), "ActorManagerActor");
}
}
skywalking-collector/skywalking-collector-cluster/src/test/java/com/a/eye/skywalking/collector/cluster/ActorProviderTestCase.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.cluster
;
import
akka.actor.ActorSystem
;
import
com.a.eye.skywalking.collector.cluster.manager.ActorManagerActorFactory
;
import
org.junit.Assert
;
import
org.junit.Test
;
import
org.mockito.Mockito
;
/**
* @author pengys5
*/
public
class
ActorProviderTestCase
{
@Test
public
void
testActorName
()
{
ActorManagerActorFactory
factory
=
new
ActorManagerActorFactory
();
String
actorName
=
factory
.
actorName
();
Assert
.
assertEquals
(
"ActorManagerActor"
,
actorName
);
}
@Test
public
void
testCreateActor
()
{
ActorSystem
system
=
Mockito
.
mock
(
ActorSystem
.
class
);
ActorManagerActorFactory
factory
=
new
ActorManagerActorFactory
();
factory
.
createActor
(
system
);
}
}
skywalking-collector/skywalking-collector-cluster/src/test/java/com/a/eye/skywalking/collector/cluster/CollectorConfigTestCase.java
浏览文件 @
dd5ce743
...
...
@@ -7,8 +7,6 @@ import com.typesafe.config.Config;
import
org.junit.Assert
;
import
org.junit.Test
;
import
java.util.ArrayList
;
/**
* Created by pengys5 on 2017/2/22 0022.
*/
...
...
skywalking-collector/skywalking-collector-worker/pom.xml
浏览文件 @
dd5ce743
...
...
@@ -11,5 +11,11 @@
<artifactId>
skywalking-collector-worker
</artifactId>
<dependencies>
<dependency>
<groupId>
com.a.eye
</groupId>
<artifactId>
skywalking-collector-cluster
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
skywalking-collector/skywalking-collector-worker/src/main/java/com/a/eye/skywalking/collector/worker/CollectorBootStartUp.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.worker
;
import
akka.actor.ActorSystem
;
import
akka.actor.Props
;
import
com.a.eye.skywalking.collector.cluster.Const
;
import
com.a.eye.skywalking.collector.cluster.consumer.TraceConsumerActor
;
/**
* @author pengys5
*/
public
class
CollectorBootStartUp
{
public
static
void
main
(
String
[]
args
)
{
// ActorSystem system = ActorSystem.create("ClusterSystem", config);
// system.actorOf(Props.create(TraceConsumerActor.class), Const.Trace_Consumer_Role);
}
}
skywalking-collector/skywalking-collector-worker/src/main/java/com/a/eye/skywalking/collector/worker/indicator/ApplicationDiscoverActor.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.worker.indicator
;
import
akka.actor.UntypedActor
;
import
com.a.eye.skywalking.collector.cluster.base.AbstractUntypedActor
;
/**
* @author pengys5
*/
public
class
ApplicationDiscoverActor
extends
AbstractUntypedActor
{
public
static
final
String
ActorName
=
"ApplicationDiscoverActor"
;
@Override
public
String
actorName
()
{
return
ActorName
;
}
@Override
public
void
onReceive
(
Object
message
)
throws
Throwable
{
}
}
skywalking-collector/skywalking-collector-worker/src/main/java/com/a/eye/skywalking/collector/worker/indicator/TraceSegmentRelationActor.java
0 → 100644
浏览文件 @
dd5ce743
package
com.a.eye.skywalking.collector.worker.indicator
;
import
akka.actor.UntypedActor
;
/**
* @author pengys5
*/
public
class
TraceSegmentRelationActor
extends
UntypedActor
{
@Override
public
void
onReceive
(
Object
message
)
throws
Throwable
{
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录