Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
killuaz丶x
SkyWalking
提交
cf544f44
S
SkyWalking
项目概览
killuaz丶x
/
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,发现更多精彩内容 >>
提交
cf544f44
编写于
10月 29, 2017
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI module register successful.
上级
9b0b919f
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
68 addition
and
7 deletion
+68
-7
apm-collector/apm-collector-boot/src/main/java/org/skywalking/apm/collector/boot/CollectorBootStartUp.java
...g/skywalking/apm/collector/boot/CollectorBootStartUp.java
+5
-0
apm-collector/apm-collector-cluster/collector-cluster-define/src/main/java/org/skywalking/apm/collector/cluster/DataMonitor.java
...ava/org/skywalking/apm/collector/cluster/DataMonitor.java
+2
-0
apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/skywalking/apm/collector/cluster/zookeeper/ClusterModuleZookeeperProvider.java
...tor/cluster/zookeeper/ClusterModuleZookeeperProvider.java
+15
-5
apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/skywalking/apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java
...apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java
+1
-1
apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/module/Module.java
...java/org/skywalking/apm/collector/core/module/Module.java
+1
-0
apm-collector/apm-collector-jetty-manager/collector-jetty-manager-define/src/main/java/org/skywalking/apm/collector/jetty/manager/JettyManagerModule.java
...lking/apm/collector/jetty/manager/JettyManagerModule.java
+2
-1
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModuleJettyProvider.java
...walking/apm/collector/ui/jetty/UIModuleJettyProvider.java
+1
-0
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModuleRegistration.java
...ywalking/apm/collector/ui/jetty/UIModuleRegistration.java
+41
-0
未找到文件。
apm-collector/apm-collector-boot/src/main/java/org/skywalking/apm/collector/boot/CollectorBootStartUp.java
浏览文件 @
cf544f44
...
...
@@ -50,5 +50,10 @@ public class CollectorBootStartUp {
}
catch
(
ServiceNotProvidedException
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
try
{
Thread
.
sleep
(
10000
);
}
catch
(
InterruptedException
e
)
{
}
}
}
apm-collector/apm-collector-cluster/collector-cluster-define/src/main/java/org/skywalking/apm/collector/cluster/DataMonitor.java
浏览文件 @
cf544f44
...
...
@@ -25,6 +25,8 @@ import org.skywalking.apm.collector.client.ClientException;
* @author peng-yongsheng
*/
public
interface
DataMonitor
{
String
BASE_CATALOG
=
"/skywalking"
;
void
setClient
(
Client
client
);
void
addListener
(
ClusterModuleListener
listener
)
throws
ClientException
;
...
...
apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/skywalking/apm/collector/cluster/zookeeper/ClusterModuleZookeeperProvider.java
浏览文件 @
cf544f44
...
...
@@ -20,6 +20,7 @@ package org.skywalking.apm.collector.cluster.zookeeper;
import
java.util.Properties
;
import
org.skywalking.apm.collector.client.zookeeper.ZookeeperClient
;
import
org.skywalking.apm.collector.client.zookeeper.ZookeeperClientException
;
import
org.skywalking.apm.collector.cluster.ClusterModule
;
import
org.skywalking.apm.collector.cluster.service.ModuleListenerService
;
import
org.skywalking.apm.collector.cluster.service.ModuleRegisterService
;
...
...
@@ -32,15 +33,20 @@ import org.skywalking.apm.collector.core.UnexpectedException;
import
org.skywalking.apm.collector.core.module.Module
;
import
org.skywalking.apm.collector.core.module.ModuleProvider
;
import
org.skywalking.apm.collector.core.module.ServiceNotProvidedException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* @author peng-yongsheng
*/
public
class
ClusterModuleZookeeperProvider
extends
ModuleProvider
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ClusterModuleZookeeperProvider
.
class
);
private
static
final
String
HOST_PORT
=
"hostPort"
;
private
static
final
String
SESSION_TIMEOUT
=
"sessionTimeout"
;
private
ZookeeperClient
zookeeperClient
;
private
ClusterZKDataMonitor
dataMonitor
;
@Override
public
String
name
()
{
...
...
@@ -56,7 +62,7 @@ public class ClusterModuleZookeeperProvider extends ModuleProvider {
final
String
hostPort
=
config
.
getProperty
(
HOST_PORT
);
final
int
sessionTimeout
=
(
Integer
)
config
.
get
(
SESSION_TIMEOUT
);
ZookeeperClient
zookeeperClient
=
new
ZookeeperClient
(
hostPort
,
sessionTimeout
,
dataMonitor
);
zookeeperClient
=
new
ZookeeperClient
(
hostPort
,
sessionTimeout
,
dataMonitor
);
dataMonitor
.
setClient
(
zookeeperClient
);
this
.
registerServiceImplementation
(
ModuleListenerService
.
class
,
new
ZookeeperModuleListenerService
(
dataMonitor
));
...
...
@@ -66,14 +72,18 @@ public class ClusterModuleZookeeperProvider extends ModuleProvider {
@Override
public
void
start
(
Properties
config
)
throws
ServiceNotProvidedException
{
try
{
dataMonitor
.
start
();
}
catch
(
Collector
Exception
e
)
{
throw
new
UnexpectedException
(
e
.
getMessage
()
);
zookeeperClient
.
initialize
();
}
catch
(
ZookeeperClient
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
}
@Override
public
void
notifyAfterCompleted
()
throws
ServiceNotProvidedException
{
try
{
dataMonitor
.
start
();
}
catch
(
CollectorException
e
)
{
throw
new
UnexpectedException
(
e
.
getMessage
());
}
}
@Override
public
String
[]
requiredModules
()
{
...
...
apm-collector/apm-collector-cluster/collector-cluster-zookeeper-provider/src/main/java/org/skywalking/apm/collector/cluster/zookeeper/ClusterZKDataMonitor.java
浏览文件 @
cf544f44
...
...
@@ -136,7 +136,7 @@ public class ClusterZKDataMonitor implements DataMonitor, Watcher {
}
@Override
public
void
register
(
String
path
,
ModuleRegistration
registration
)
{
registrations
.
put
(
path
,
registration
);
registrations
.
put
(
BASE_CATALOG
+
path
,
registration
);
}
@Override
public
ClusterModuleListener
getListener
(
String
path
)
{
...
...
apm-collector/apm-collector-core/src/main/java/org/skywalking/apm/collector/core/module/Module.java
浏览文件 @
cf544f44
...
...
@@ -98,6 +98,7 @@ public abstract class Module {
}
}
}
logger
.
info
(
"start the provider {} in {} module."
,
provider
.
name
(),
provider
.
module
().
getName
());
provider
.
start
(
configuration
.
getProviderConfiguration
(
provider
.
name
()));
provider
.
requiredCheck
(
services
());
...
...
apm-collector/apm-collector-jetty-manager/collector-jetty-manager-define/src/main/java/org/skywalking/apm/collector/jetty/manager/JettyManagerModule.java
浏览文件 @
cf544f44
...
...
@@ -19,6 +19,7 @@
package
org.skywalking.apm.collector.jetty.manager
;
import
org.skywalking.apm.collector.core.module.Module
;
import
org.skywalking.apm.collector.jetty.manager.service.JettyManagerService
;
/**
* @author peng-yongsheng
...
...
@@ -32,6 +33,6 @@ public class JettyManagerModule extends Module {
}
@Override
public
Class
[]
services
()
{
return
new
Class
[
0
]
;
return
new
Class
[
]
{
JettyManagerService
.
class
}
;
}
}
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModuleJettyProvider.java
浏览文件 @
cf544f44
...
...
@@ -59,6 +59,7 @@ public class UIModuleJettyProvider extends ModuleProvider {
Server
jettyServer
=
managerService
.
getElseCreateServer
(
host
,
port
,
contextPath
);
ModuleRegisterService
moduleRegisterService
=
getManager
().
find
(
ClusterModule
.
NAME
).
getService
(
ModuleRegisterService
.
class
);
moduleRegisterService
.
register
(
UIModule
.
NAME
,
this
.
name
(),
new
UIModuleRegistration
(
host
,
port
,
contextPath
));
}
catch
(
ModuleNotFoundException
e
)
{
throw
new
ServiceNotProvidedException
(
e
.
getMessage
());
}
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModuleRegistration.java
0 → 100644
浏览文件 @
cf544f44
/*
* Copyright 2017, OpenSkywalking Organization All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Project repository: https://github.com/OpenSkywalking/skywalking
*/
package
org.skywalking.apm.collector.ui.jetty
;
import
org.skywalking.apm.collector.cluster.ModuleRegistration
;
/**
* @author peng-yongsheng
*/
public
class
UIModuleRegistration
extends
ModuleRegistration
{
private
final
String
host
;
private
final
int
port
;
private
final
String
contextPath
;
public
UIModuleRegistration
(
String
host
,
int
port
,
String
contextPath
)
{
this
.
host
=
host
;
this
.
port
=
port
;
this
.
contextPath
=
contextPath
;
}
@Override
public
Value
buildValue
()
{
return
new
Value
(
host
,
port
,
contextPath
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录