Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿信在这里
SkyWalking
提交
baa0a3c0
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,发现更多精彩内容 >>
提交
baa0a3c0
编写于
11月 01, 2017
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add the implement of remote module.
上级
80fcbf37
变更
50
隐藏空白更改
内联
并排
Showing
50 changed file
with
1744 addition
and
21 deletion
+1744
-21
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/RemoteDataMapping.java
...rg/skywalking/apm/collector/remote/RemoteDataMapping.java
+26
-0
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/RemoteDataMappingContainer.java
...king/apm/collector/remote/RemoteDataMappingContainer.java
+39
-0
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/RemoteModule.java
...ava/org/skywalking/apm/collector/remote/RemoteModule.java
+20
-2
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/DataReceiver.java
...skywalking/apm/collector/remote/service/DataReceiver.java
+19
-1
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/DataReceiverRegisterListener.java
...ollector/remote/service/DataReceiverRegisterListener.java
+35
-0
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/DataService.java
.../skywalking/apm/collector/remote/service/DataService.java
+0
-12
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/RemoteClient.java
...skywalking/apm/collector/remote/service/RemoteClient.java
+28
-0
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/RemoteClientService.java
...ing/apm/collector/remote/service/RemoteClientService.java
+28
-0
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/RemoteServerService.java
...ing/apm/collector/remote/service/RemoteServerService.java
+28
-0
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/SerializableAndDeserialize.java
.../collector/remote/service/SerializableAndDeserialize.java
+33
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/pom.xml
...apm-collector-remote/collector-remote-grpc-define/pom.xml
+55
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/RemoteModuleGRPCProvider.java
...g/apm/collector/remote/grpc/RemoteModuleGRPCProvider.java
+40
-3
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/RemoteModuleGRPCRegistration.java
...m/collector/remote/grpc/RemoteModuleGRPCRegistration.java
+40
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/data/GRPCData.java
...g/skywalking/apm/collector/remote/grpc/data/GRPCData.java
+33
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/data/instance/InstPerformanceData.java
...lector/remote/grpc/data/instance/InstPerformanceData.java
+55
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/handler/RemoteCommonServiceHandler.java
...ector/remote/grpc/handler/RemoteCommonServiceHandler.java
+64
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/service/GRPCRemoteClient.java
...g/apm/collector/remote/grpc/service/GRPCRemoteClient.java
+50
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/service/GRPCRemoteClientService.java
...ollector/remote/grpc/service/GRPCRemoteClientService.java
+116
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/service/GRPCRemoteServerService.java
...ollector/remote/grpc/service/GRPCRemoteServerService.java
+21
-0
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/proto/RemoteCommonService.proto
...mote-grpc-define/src/main/proto/RemoteCommonService.proto
+33
-0
apm-collector/apm-collector-remote/pom.xml
apm-collector/apm-collector-remote/pom.xml
+5
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/StorageException.java
...rg/skywalking/apm/collector/storage/StorageException.java
+18
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/Attribute.java
...rg/skywalking/apm/collector/storage/define/Attribute.java
+46
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/AttributeType.java
...kywalking/apm/collector/storage/define/AttributeType.java
+26
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/CommonTable.java
.../skywalking/apm/collector/storage/define/CommonTable.java
+29
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/DataDefine.java
...g/skywalking/apm/collector/storage/define/DataDefine.java
+107
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/Operation.java
...rg/skywalking/apm/collector/storage/define/Operation.java
+36
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/Transform.java
...rg/skywalking/apm/collector/storage/define/Transform.java
+30
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/operator/AddOperation.java
...g/apm/collector/storage/define/operator/AddOperation.java
+51
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/operator/CoverOperation.java
...apm/collector/storage/define/operator/CoverOperation.java
+50
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/operator/NonOperation.java
...g/apm/collector/storage/define/operator/NonOperation.java
+50
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/global/GlobalTraceTable.java
.../apm/collector/storage/table/global/GlobalTraceTable.java
+30
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/instance/InstPerformanceTable.java
...ollector/storage/table/instance/InstPerformanceTable.java
+32
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/CpuMetricTable.java
...lking/apm/collector/storage/table/jvm/CpuMetricTable.java
+30
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/GCMetricTable.java
...alking/apm/collector/storage/table/jvm/GCMetricTable.java
+32
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/MemoryMetricTable.java
...ng/apm/collector/storage/table/jvm/MemoryMetricTable.java
+34
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/MemoryPoolMetricTable.java
...pm/collector/storage/table/jvm/MemoryPoolMetricTable.java
+34
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/node/NodeComponentTable.java
.../apm/collector/storage/table/node/NodeComponentTable.java
+32
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/node/NodeMappingTable.java
...ng/apm/collector/storage/table/node/NodeMappingTable.java
+31
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/noderef/NodeReferenceTable.java
...m/collector/storage/table/noderef/NodeReferenceTable.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/register/ApplicationTable.java
...pm/collector/storage/table/register/ApplicationTable.java
+30
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/register/InstanceTable.java
...g/apm/collector/storage/table/register/InstanceTable.java
+34
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/register/ServiceNameTable.java
...pm/collector/storage/table/register/ServiceNameTable.java
+31
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/segment/SegmentCostTable.java
...apm/collector/storage/table/segment/SegmentCostTable.java
+35
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/segment/SegmentTable.java
...ing/apm/collector/storage/table/segment/SegmentTable.java
+29
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/service/ServiceEntryTable.java
...pm/collector/storage/table/service/ServiceEntryTable.java
+33
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/serviceref/ServiceReferenceTable.java
...ector/storage/table/serviceref/ServiceReferenceTable.java
+41
-0
apm-collector/apm-collector-storage/pom.xml
apm-collector/apm-collector-storage/pom.xml
+5
-0
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
-1
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModuleJettyRegistration.java
...ing/apm/collector/ui/jetty/UIModuleJettyRegistration.java
+2
-2
未找到文件。
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/RemoteDataMapping.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote
;
/**
* @author peng-yongsheng
*/
public
enum
RemoteDataMapping
{
InstPerformance
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/RemoteDataMappingContainer.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.skywalking.apm.collector.remote.service.SerializableAndDeserialize
;
/**
* @author peng-yongsheng
*/
public
class
RemoteDataMappingContainer
{
private
Map
<
Integer
,
SerializableAndDeserialize
>
mapping
=
new
HashMap
<>();
public
void
addMapping
(
SerializableAndDeserialize
instance
)
{
mapping
.
put
(
instance
.
mapping
().
ordinal
(),
instance
);
}
public
SerializableAndDeserialize
get
(
Integer
mappingId
)
{
return
mapping
.
get
(
mappingId
);
}
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/RemoteModule.java
浏览文件 @
baa0a3c0
/*
* 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.remote
;
import
org.skywalking.apm.collector.core.module.Module
;
import
org.skywalking.apm.collector.remote.service.
Data
Service
;
import
org.skywalking.apm.collector.remote.service.
RemoteServer
Service
;
/**
* @author peng-yongsheng
...
...
@@ -15,6 +33,6 @@ public class RemoteModule extends Module {
}
@Override
public
Class
[]
services
()
{
return
new
Class
[]
{
Data
Service
.
class
};
return
new
Class
[]
{
RemoteServer
Service
.
class
};
}
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/DataReceiver.java
浏览文件 @
baa0a3c0
/*
* 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.remote.service
;
/**
* @author peng-yongsheng
*/
public
interface
DataReceiver
{
void
receive
(
Data
data
);
void
receive
(
String
roleName
,
Data
data
);
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/DataReceiverRegisterListener.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.service
;
/**
* @author peng-yongsheng
*/
public
class
DataReceiverRegisterListener
{
private
DataReceiver
dataReceiver
;
public
DataReceiver
getDataReceiver
()
{
return
dataReceiver
;
}
public
void
setDataReceiver
(
DataReceiver
dataReceiver
)
{
this
.
dataReceiver
=
dataReceiver
;
}
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/DataService.java
已删除
100644 → 0
浏览文件 @
80fcbf37
package
org.skywalking.apm.collector.remote.service
;
import
org.skywalking.apm.collector.core.module.Service
;
/**
* @author peng-yongsheng
*/
public
interface
DataService
extends
Service
{
void
send
(
Data
data
);
void
registerReceiver
(
DataReceiver
receiver
);
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/RemoteClient.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.service
;
import
org.skywalking.apm.collector.remote.RemoteDataMapping
;
/**
* @author peng-yongsheng
*/
public
interface
RemoteClient
{
void
send
(
String
roleName
,
Data
data
,
RemoteDataMapping
mapping
);
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/RemoteClientService.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.service
;
import
org.skywalking.apm.collector.core.module.Service
;
/**
* @author peng-yongsheng
*/
public
interface
RemoteClientService
extends
Service
{
RemoteClient
create
(
String
host
,
int
port
);
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/RemoteServerService.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.service
;
import
org.skywalking.apm.collector.core.module.Service
;
/**
* @author peng-yongsheng
*/
public
interface
RemoteServerService
extends
Service
{
void
registerReceiver
(
DataReceiver
receiver
);
}
apm-collector/apm-collector-remote/collector-remote-define/src/main/java/org/skywalking/apm/collector/remote/service/SerializableAndDeserialize.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.service
;
import
org.skywalking.apm.collector.remote.RemoteDataMapping
;
/**
* @author peng-yongsheng
*/
public
interface
SerializableAndDeserialize
<
T
,
B
>
{
RemoteDataMapping
mapping
();
Data
deserialize
(
T
remoteData
);
B
serialize
(
Data
data
);
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/pom.xml
浏览文件 @
baa0a3c0
...
...
@@ -12,11 +12,66 @@
<artifactId>
collector-remote-grpc-define
</artifactId>
<packaging>
jar
</packaging>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<grpc.version>
1.4.0
</grpc.version>
</properties>
<dependencies>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
collector-remote-define
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
collector-grpc-manager-define
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>
kr.motd.maven
</groupId>
<artifactId>
os-maven-plugin
</artifactId>
<version>
1.4.1.Final
</version>
</extension>
</extensions>
<plugins>
<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>
<plugin>
<groupId>
org.xolstice.maven.plugins
</groupId>
<artifactId>
protobuf-maven-plugin
</artifactId>
<version>
0.5.0
</version>
<configuration>
<!--
The version of protoc must match protobuf-java. If you don't depend on
protobuf-java directly, you will be transitively depending on the
protobuf-java version that grpc depends on.
-->
<protocArtifact>
com.google.protobuf:protoc:3.3.0:exe:${os.detected.classifier}
</protocArtifact>
<pluginId>
grpc-java
</pluginId>
<pluginArtifact>
io.grpc:protoc-gen-grpc-java:1.4.0:exe:${os.detected.classifier}
</pluginArtifact>
</configuration>
<executions>
<execution>
<goals>
<goal>
compile
</goal>
<goal>
compile-custom
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/RemoteModuleGRPCProvider.java
浏览文件 @
baa0a3c0
package
org.skywalking.apm.collector.remote.grpc
;
import
java.util.Properties
;
import
org.skywalking.apm.collector.cluster.ClusterModule
;
import
org.skywalking.apm.collector.cluster.service.ModuleRegisterService
;
import
org.skywalking.apm.collector.core.module.Module
;
import
org.skywalking.apm.collector.core.module.ModuleNotFoundException
;
import
org.skywalking.apm.collector.core.module.ModuleProvider
;
import
org.skywalking.apm.collector.core.module.ServiceNotProvidedException
;
import
org.skywalking.apm.collector.grpc.manager.GRPCManagerModule
;
import
org.skywalking.apm.collector.grpc.manager.service.GRPCManagerService
;
import
org.skywalking.apm.collector.remote.RemoteDataMappingContainer
;
import
org.skywalking.apm.collector.remote.RemoteModule
;
import
org.skywalking.apm.collector.remote.grpc.service.GRPCDataService
;
import
org.skywalking.apm.collector.remote.service.DataService
;
import
org.skywalking.apm.collector.remote.grpc.data.instance.InstPerformanceData
;
import
org.skywalking.apm.collector.remote.grpc.handler.RemoteCommonServiceHandler
;
import
org.skywalking.apm.collector.remote.grpc.service.GRPCRemoteClientService
;
import
org.skywalking.apm.collector.remote.grpc.service.GRPCRemoteServerService
;
import
org.skywalking.apm.collector.remote.service.DataReceiverRegisterListener
;
import
org.skywalking.apm.collector.remote.service.RemoteClientService
;
import
org.skywalking.apm.collector.remote.service.RemoteServerService
;
import
org.skywalking.apm.collector.server.Server
;
/**
* @author peng-yongsheng
*/
public
class
RemoteModuleGRPCProvider
extends
ModuleProvider
{
private
static
final
String
HOST
=
"host"
;
private
static
final
String
PORT
=
"port"
;
private
RemoteDataMappingContainer
container
;
private
final
DataReceiverRegisterListener
listener
=
new
DataReceiverRegisterListener
();
@Override
public
String
name
()
{
return
"gRPC"
;
}
...
...
@@ -22,11 +39,25 @@ public class RemoteModuleGRPCProvider extends ModuleProvider {
}
@Override
public
void
prepare
(
Properties
config
)
throws
ServiceNotProvidedException
{
this
.
registerServiceImplementation
(
DataService
.
class
,
new
GRPCDataService
());
container
=
loadMapping
();
this
.
registerServiceImplementation
(
RemoteServerService
.
class
,
new
GRPCRemoteServerService
(
listener
));
this
.
registerServiceImplementation
(
RemoteClientService
.
class
,
new
GRPCRemoteClientService
(
container
));
}
@Override
public
void
start
(
Properties
config
)
throws
ServiceNotProvidedException
{
String
host
=
config
.
getProperty
(
HOST
);
Integer
port
=
(
Integer
)
config
.
get
(
PORT
);
try
{
GRPCManagerService
managerService
=
getManager
().
find
(
GRPCManagerModule
.
NAME
).
getService
(
GRPCManagerService
.
class
);
Server
gRPCServer
=
managerService
.
getOrCreateIfAbsent
(
host
,
port
);
gRPCServer
.
addHandler
(
new
RemoteCommonServiceHandler
(
container
,
listener
));
ModuleRegisterService
moduleRegisterService
=
getManager
().
find
(
ClusterModule
.
NAME
).
getService
(
ModuleRegisterService
.
class
);
moduleRegisterService
.
register
(
RemoteModule
.
NAME
,
this
.
name
(),
new
RemoteModuleGRPCRegistration
(
host
,
port
));
}
catch
(
ModuleNotFoundException
e
)
{
throw
new
ServiceNotProvidedException
(
e
.
getMessage
());
}
}
@Override
public
void
notifyAfterCompleted
()
throws
ServiceNotProvidedException
{
...
...
@@ -36,4 +67,10 @@ public class RemoteModuleGRPCProvider extends ModuleProvider {
@Override
public
String
[]
requiredModules
()
{
return
new
String
[
0
];
}
private
RemoteDataMappingContainer
loadMapping
()
{
RemoteDataMappingContainer
container
=
new
RemoteDataMappingContainer
();
container
.
addMapping
(
new
InstPerformanceData
());
return
container
;
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/RemoteModuleGRPCRegistration.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.grpc
;
import
org.skywalking.apm.collector.cluster.ModuleRegistration
;
import
org.skywalking.apm.collector.core.util.Const
;
/**
* @author peng-yongsheng
*/
public
class
RemoteModuleGRPCRegistration
extends
ModuleRegistration
{
private
final
String
host
;
private
final
int
port
;
public
RemoteModuleGRPCRegistration
(
String
host
,
int
port
)
{
this
.
host
=
host
;
this
.
port
=
port
;
}
@Override
public
Value
buildValue
()
{
return
new
Value
(
host
,
port
,
Const
.
EMPTY_STRING
);
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/data/GRPCData.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.grpc.data
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteData
;
import
org.skywalking.apm.collector.remote.service.Data
;
import
org.skywalking.apm.collector.remote.service.SerializableAndDeserialize
;
/**
* @author peng-yongsheng
*/
public
abstract
class
GRPCData
implements
SerializableAndDeserialize
<
RemoteData
,
RemoteData
.
Builder
>
{
protected
Data
build
(
RemoteData
remoteData
)
{
return
new
Data
(
remoteData
.
getDataStrings
(
0
),
remoteData
.
getStringCapacity
(),
remoteData
.
getLongCapacity
(),
remoteData
.
getDoubleCapacity
(),
remoteData
.
getIntegerCapacity
(),
remoteData
.
getBooleanCapacity
(),
remoteData
.
getByteCapacity
());
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/data/instance/InstPerformanceData.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.grpc.data.instance
;
import
org.skywalking.apm.collector.remote.RemoteDataMapping
;
import
org.skywalking.apm.collector.remote.grpc.data.GRPCData
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteData
;
import
org.skywalking.apm.collector.remote.service.Data
;
/**
* @author peng-yongsheng
*/
public
class
InstPerformanceData
extends
GRPCData
{
@Override
public
RemoteDataMapping
mapping
()
{
return
RemoteDataMapping
.
InstPerformance
;
}
@Override
public
Data
deserialize
(
RemoteData
remoteData
)
{
Data
data
=
build
(
remoteData
);
data
.
setDataInteger
(
0
,
remoteData
.
getDataIntegers
(
0
));
data
.
setDataInteger
(
1
,
remoteData
.
getDataIntegers
(
1
));
data
.
setDataInteger
(
2
,
remoteData
.
getDataIntegers
(
2
));
data
.
setDataLong
(
0
,
remoteData
.
getDataLongs
(
0
));
data
.
setDataLong
(
1
,
remoteData
.
getDataLongs
(
1
));
return
data
;
}
@Override
public
RemoteData
.
Builder
serialize
(
Data
data
)
{
RemoteData
.
Builder
builder
=
RemoteData
.
newBuilder
();
builder
.
addDataStrings
(
data
.
getDataString
(
0
));
builder
.
addDataIntegers
(
data
.
getDataInteger
(
0
));
builder
.
addDataIntegers
(
data
.
getDataInteger
(
1
));
builder
.
addDataIntegers
(
data
.
getDataInteger
(
2
));
builder
.
addDataLongs
(
data
.
getDataLong
(
0
));
builder
.
addDataLongs
(
data
.
getDataLong
(
1
));
return
builder
;
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/handler/RemoteCommonServiceHandler.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.grpc.handler
;
import
io.grpc.stub.StreamObserver
;
import
org.skywalking.apm.collector.remote.RemoteDataMappingContainer
;
import
org.skywalking.apm.collector.remote.grpc.proto.Empty
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteCommonServiceGrpc
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteData
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteMessage
;
import
org.skywalking.apm.collector.remote.service.DataReceiverRegisterListener
;
import
org.skywalking.apm.collector.server.grpc.GRPCHandler
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* @author peng-yongsheng
*/
public
class
RemoteCommonServiceHandler
extends
RemoteCommonServiceGrpc
.
RemoteCommonServiceImplBase
implements
GRPCHandler
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
RemoteCommonServiceHandler
.
class
);
private
final
RemoteDataMappingContainer
container
;
private
final
DataReceiverRegisterListener
listener
;
public
RemoteCommonServiceHandler
(
RemoteDataMappingContainer
container
,
DataReceiverRegisterListener
listener
)
{
this
.
container
=
container
;
this
.
listener
=
listener
;
}
@Override
public
StreamObserver
<
RemoteMessage
>
call
(
StreamObserver
<
Empty
>
responseObserver
)
{
return
new
StreamObserver
<
RemoteMessage
>()
{
@Override
public
void
onNext
(
RemoteMessage
message
)
{
String
roleName
=
message
.
getWorkerRole
();
RemoteData
remoteData
=
message
.
getRemoteData
();
listener
.
getDataReceiver
().
receive
(
roleName
,
container
.
get
(
remoteData
.
getMappingId
()).
deserialize
(
remoteData
));
}
@Override
public
void
onError
(
Throwable
throwable
)
{
logger
.
error
(
throwable
.
getMessage
(),
throwable
);
}
@Override
public
void
onCompleted
()
{
responseObserver
.
onCompleted
();
}
};
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/service/GRPCRemoteClient.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.grpc.service
;
import
io.grpc.stub.StreamObserver
;
import
org.skywalking.apm.collector.remote.RemoteDataMapping
;
import
org.skywalking.apm.collector.remote.RemoteDataMappingContainer
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteData
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteMessage
;
import
org.skywalking.apm.collector.remote.service.Data
;
import
org.skywalking.apm.collector.remote.service.RemoteClient
;
/**
* @author peng-yongsheng
*/
public
class
GRPCRemoteClient
implements
RemoteClient
{
private
final
RemoteDataMappingContainer
container
;
private
final
StreamObserver
<
RemoteMessage
>
streamObserver
;
public
GRPCRemoteClient
(
RemoteDataMappingContainer
container
,
StreamObserver
<
RemoteMessage
>
streamObserver
)
{
this
.
container
=
container
;
this
.
streamObserver
=
streamObserver
;
}
@Override
public
void
send
(
String
roleName
,
Data
data
,
RemoteDataMapping
mapping
)
{
RemoteData
remoteData
=
(
RemoteData
)
container
.
get
(
mapping
.
ordinal
()).
serialize
(
data
);
RemoteMessage
.
Builder
builder
=
RemoteMessage
.
newBuilder
();
builder
.
setWorkerRole
(
roleName
);
builder
.
setRemoteData
(
remoteData
);
streamObserver
.
onNext
(
builder
.
build
());
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/service/GRPCRemoteClientService.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.remote.grpc.service
;
import
io.grpc.stub.StreamObserver
;
import
org.skywalking.apm.collector.client.ClientException
;
import
org.skywalking.apm.collector.client.grpc.GRPCClient
;
import
org.skywalking.apm.collector.remote.RemoteDataMappingContainer
;
import
org.skywalking.apm.collector.remote.grpc.proto.Empty
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteCommonServiceGrpc
;
import
org.skywalking.apm.collector.remote.grpc.proto.RemoteMessage
;
import
org.skywalking.apm.collector.remote.service.RemoteClient
;
import
org.skywalking.apm.collector.remote.service.RemoteClientService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* @author peng-yongsheng
*/
public
class
GRPCRemoteClientService
implements
RemoteClientService
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
GRPCRemoteClientService
.
class
);
private
final
RemoteDataMappingContainer
container
;
public
GRPCRemoteClientService
(
RemoteDataMappingContainer
container
)
{
this
.
container
=
container
;
}
@Override
public
RemoteClient
create
(
String
host
,
int
port
)
{
GRPCClient
client
=
new
GRPCClient
(
host
,
port
);
try
{
client
.
initialize
();
}
catch
(
ClientException
e
)
{
e
.
printStackTrace
();
}
RemoteCommonServiceGrpc
.
RemoteCommonServiceStub
stub
=
RemoteCommonServiceGrpc
.
newStub
(
client
.
getChannel
());
StreamObserver
<
RemoteMessage
>
streamObserver
=
createStreamObserver
(
stub
);
return
new
GRPCRemoteClient
(
container
,
streamObserver
);
}
private
StreamObserver
<
RemoteMessage
>
createStreamObserver
(
RemoteCommonServiceGrpc
.
RemoteCommonServiceStub
stub
)
{
StreamStatus
status
=
new
StreamStatus
(
false
);
return
stub
.
call
(
new
StreamObserver
<
Empty
>()
{
@Override
public
void
onNext
(
Empty
empty
)
{
}
@Override
public
void
onError
(
Throwable
throwable
)
{
logger
.
error
(
throwable
.
getMessage
(),
throwable
);
}
@Override
public
void
onCompleted
()
{
status
.
finished
();
}
});
}
class
StreamStatus
{
private
volatile
boolean
status
;
public
StreamStatus
(
boolean
status
)
{
this
.
status
=
status
;
}
public
boolean
isFinish
()
{
return
status
;
}
public
void
finished
()
{
this
.
status
=
true
;
}
/**
* @param maxTimeout max wait time, milliseconds.
*/
public
void
wait4Finish
(
long
maxTimeout
)
{
long
time
=
0
;
while
(!
status
)
{
if
(
time
>
maxTimeout
)
{
break
;
}
try2Sleep
(
5
);
time
+=
5
;
}
}
/**
* Try to sleep, and ignore the {@link InterruptedException}
*
* @param millis the length of time to sleep in milliseconds
*/
private
void
try2Sleep
(
long
millis
)
{
try
{
Thread
.
sleep
(
millis
);
}
catch
(
InterruptedException
e
)
{
}
}
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/service/GRPC
Data
Service.java
→
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/java/org/skywalking/apm/collector/remote/grpc/service/GRPC
RemoteServer
Service.java
浏览文件 @
baa0a3c0
package
org.skywalking.apm.collector.remote.grpc.service
;
import
org.skywalking.apm.collector.remote.service.Data
;
import
org.skywalking.apm.collector.remote.service.DataReceiver
;
import
org.skywalking.apm.collector.remote.service.DataService
;
import
org.skywalking.apm.collector.remote.service.DataReceiverRegisterListener
;
import
org.skywalking.apm.collector.remote.service.RemoteServerService
;
/**
* @author peng-yongsheng
*/
public
class
GRPC
DataService
implements
Data
Service
{
public
class
GRPC
RemoteServerService
implements
RemoteServer
Service
{
@Override
public
void
send
(
Data
data
)
{
private
DataReceiverRegisterListener
listener
;
public
GRPCRemoteServerService
(
DataReceiverRegisterListener
listener
)
{
this
.
listener
=
listener
;
}
@Override
public
void
registerReceiver
(
DataReceiver
receiver
)
{
listener
.
setDataReceiver
(
receiver
);
}
}
apm-collector/apm-collector-remote/collector-remote-grpc-define/src/main/proto/RemoteCommonService.proto
0 → 100644
浏览文件 @
baa0a3c0
syntax
=
"proto3"
;
option
java_multiple_files
=
true
;
option
java_package
=
"org.skywalking.apm.collector.remote.grpc.proto"
;
service
RemoteCommonService
{
rpc
call
(
stream
RemoteMessage
)
returns
(
Empty
)
{
}
}
message
RemoteMessage
{
string
workerRole
=
1
;
RemoteData
remoteData
=
2
;
}
message
RemoteData
{
int32
mappingId
=
1
;
int32
stringCapacity
=
2
;
int32
longCapacity
=
3
;
int32
doubleCapacity
=
4
;
int32
integerCapacity
=
5
;
int32
byteCapacity
=
6
;
int32
booleanCapacity
=
7
;
repeated
string
dataStrings
=
8
;
repeated
int64
dataLongs
=
9
;
repeated
double
dataDoubles
=
10
;
repeated
int32
dataIntegers
=
11
;
repeated
bytes
dataBytes
=
12
;
repeated
bool
dataBooleans
=
13
;
}
message
Empty
{
}
\ No newline at end of file
apm-collector/apm-collector-remote/pom.xml
浏览文件 @
baa0a3c0
...
...
@@ -22,6 +22,11 @@
<artifactId>
apm-collector-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
collector-cluster-define
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
client-component
</artifactId>
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/StorageException.java
浏览文件 @
baa0a3c0
/*
* 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.storage
;
import
org.skywalking.apm.collector.core.CollectorException
;
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/Attribute.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define
;
/**
* @author peng-yongsheng
*/
public
class
Attribute
{
private
final
String
name
;
private
final
AttributeType
type
;
private
final
Operation
operation
;
public
Attribute
(
String
name
,
AttributeType
type
,
Operation
operation
)
{
this
.
name
=
name
;
this
.
type
=
type
;
this
.
operation
=
operation
;
}
public
String
getName
()
{
return
name
;
}
public
AttributeType
getType
()
{
return
type
;
}
public
Operation
getOperation
()
{
return
operation
;
}
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/AttributeType.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define
;
/**
* @author peng-yongsheng
*/
public
enum
AttributeType
{
STRING
,
LONG
,
DOUBLE
,
INTEGER
,
BYTE
,
BOOLEAN
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/CommonTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define
;
/**
* @author peng-yongsheng
*/
public
class
CommonTable
{
public
static
final
String
TABLE_TYPE
=
"type"
;
public
static
final
String
COLUMN_ID
=
"id"
;
public
static
final
String
COLUMN_AGG
=
"agg"
;
public
static
final
String
COLUMN_TIME_BUCKET
=
"time_bucket"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/DataDefine.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define
;
import
org.skywalking.apm.collector.remote.service.Data
;
/**
* @author peng-yongsheng
*/
public
abstract
class
DataDefine
{
private
Attribute
[]
attributes
;
private
int
stringCapacity
;
private
int
longCapacity
;
private
int
doubleCapacity
;
private
int
integerCapacity
;
private
int
booleanCapacity
;
private
int
byteCapacity
;
public
DataDefine
()
{
initial
();
}
private
void
initial
()
{
attributes
=
new
Attribute
[
initialCapacity
()];
attributeDefine
();
for
(
Attribute
attribute
:
attributes
)
{
if
(
AttributeType
.
STRING
.
equals
(
attribute
.
getType
()))
{
stringCapacity
++;
}
else
if
(
AttributeType
.
LONG
.
equals
(
attribute
.
getType
()))
{
longCapacity
++;
}
else
if
(
AttributeType
.
DOUBLE
.
equals
(
attribute
.
getType
()))
{
doubleCapacity
++;
}
else
if
(
AttributeType
.
INTEGER
.
equals
(
attribute
.
getType
()))
{
integerCapacity
++;
}
else
if
(
AttributeType
.
BOOLEAN
.
equals
(
attribute
.
getType
()))
{
booleanCapacity
++;
}
else
if
(
AttributeType
.
BYTE
.
equals
(
attribute
.
getType
()))
{
byteCapacity
++;
}
}
}
public
final
void
addAttribute
(
int
position
,
Attribute
attribute
)
{
attributes
[
position
]
=
attribute
;
}
protected
abstract
int
initialCapacity
();
protected
abstract
void
attributeDefine
();
public
final
Data
build
(
String
id
)
{
return
new
Data
(
id
,
stringCapacity
,
longCapacity
,
doubleCapacity
,
integerCapacity
,
booleanCapacity
,
byteCapacity
);
}
public
void
mergeData
(
Data
newData
,
Data
oldData
)
{
int
stringPosition
=
0
;
int
longPosition
=
0
;
int
doublePosition
=
0
;
int
integerPosition
=
0
;
int
booleanPosition
=
0
;
int
bytePosition
=
0
;
for
(
int
i
=
0
;
i
<
initialCapacity
();
i
++)
{
Attribute
attribute
=
attributes
[
i
];
if
(
AttributeType
.
STRING
.
equals
(
attribute
.
getType
()))
{
String
stringData
=
attribute
.
getOperation
().
operate
(
newData
.
getDataString
(
stringPosition
),
oldData
.
getDataString
(
stringPosition
));
newData
.
setDataString
(
stringPosition
,
stringData
);
stringPosition
++;
}
else
if
(
AttributeType
.
LONG
.
equals
(
attribute
.
getType
()))
{
Long
longData
=
attribute
.
getOperation
().
operate
(
newData
.
getDataLong
(
longPosition
),
oldData
.
getDataLong
(
longPosition
));
newData
.
setDataLong
(
longPosition
,
longData
);
longPosition
++;
}
else
if
(
AttributeType
.
DOUBLE
.
equals
(
attribute
.
getType
()))
{
Double
doubleData
=
attribute
.
getOperation
().
operate
(
newData
.
getDataDouble
(
doublePosition
),
oldData
.
getDataDouble
(
doublePosition
));
newData
.
setDataDouble
(
doublePosition
,
doubleData
);
doublePosition
++;
}
else
if
(
AttributeType
.
INTEGER
.
equals
(
attribute
.
getType
()))
{
Integer
integerData
=
attribute
.
getOperation
().
operate
(
newData
.
getDataInteger
(
integerPosition
),
oldData
.
getDataInteger
(
integerPosition
));
newData
.
setDataInteger
(
integerPosition
,
integerData
);
integerPosition
++;
}
else
if
(
AttributeType
.
BOOLEAN
.
equals
(
attribute
.
getType
()))
{
Boolean
booleanData
=
attribute
.
getOperation
().
operate
(
newData
.
getDataBoolean
(
booleanPosition
),
oldData
.
getDataBoolean
(
booleanPosition
));
newData
.
setDataBoolean
(
booleanPosition
,
booleanData
);
booleanPosition
++;
}
else
if
(
AttributeType
.
BYTE
.
equals
(
attribute
.
getType
()))
{
byte
[]
byteData
=
attribute
.
getOperation
().
operate
(
newData
.
getDataBytes
(
bytePosition
),
oldData
.
getDataBytes
(
integerPosition
));
newData
.
setDataBytes
(
bytePosition
,
byteData
);
bytePosition
++;
}
}
}
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/Operation.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define
;
/**
* @author peng-yongsheng
*/
public
interface
Operation
{
String
operate
(
String
newValue
,
String
oldValue
);
Long
operate
(
Long
newValue
,
Long
oldValue
);
Double
operate
(
Double
newValue
,
Double
oldValue
);
Integer
operate
(
Integer
newValue
,
Integer
oldValue
);
Boolean
operate
(
Boolean
newValue
,
Boolean
oldValue
);
byte
[]
operate
(
byte
[]
newValue
,
byte
[]
oldValue
);
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/Transform.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define
;
import
org.skywalking.apm.collector.remote.service.Data
;
/**
* @author peng-yongsheng
*/
public
interface
Transform
<
T
>
{
Data
toData
();
T
toSelf
(
Data
data
);
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/operator/AddOperation.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define.operator
;
import
org.skywalking.apm.collector.storage.define.Operation
;
/**
* @author peng-yongsheng
*/
public
class
AddOperation
implements
Operation
{
@Override
public
String
operate
(
String
newValue
,
String
oldValue
)
{
throw
new
UnsupportedOperationException
(
"not support string addition operation"
);
}
@Override
public
Long
operate
(
Long
newValue
,
Long
oldValue
)
{
return
newValue
+
oldValue
;
}
@Override
public
Double
operate
(
Double
newValue
,
Double
oldValue
)
{
return
newValue
+
oldValue
;
}
@Override
public
Integer
operate
(
Integer
newValue
,
Integer
oldValue
)
{
return
newValue
+
oldValue
;
}
@Override
public
Boolean
operate
(
Boolean
newValue
,
Boolean
oldValue
)
{
throw
new
UnsupportedOperationException
(
"not support boolean addition operation"
);
}
@Override
public
byte
[]
operate
(
byte
[]
newValue
,
byte
[]
oldValue
)
{
throw
new
UnsupportedOperationException
(
"not support byte addition operation"
);
}
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/operator/CoverOperation.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define.operator
;
import
org.skywalking.apm.collector.storage.define.Operation
;
/**
* @author peng-yongsheng
*/
public
class
CoverOperation
implements
Operation
{
@Override
public
String
operate
(
String
newValue
,
String
oldValue
)
{
return
newValue
;
}
@Override
public
Long
operate
(
Long
newValue
,
Long
oldValue
)
{
return
newValue
;
}
@Override
public
Double
operate
(
Double
newValue
,
Double
oldValue
)
{
return
newValue
;
}
@Override
public
Integer
operate
(
Integer
newValue
,
Integer
oldValue
)
{
return
newValue
;
}
@Override
public
Boolean
operate
(
Boolean
newValue
,
Boolean
oldValue
)
{
return
newValue
;
}
@Override
public
byte
[]
operate
(
byte
[]
newValue
,
byte
[]
oldValue
)
{
return
newValue
;
}
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/define/operator/NonOperation.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.define.operator
;
import
org.skywalking.apm.collector.storage.define.Operation
;
/**
* @author peng-yongsheng
*/
public
class
NonOperation
implements
Operation
{
@Override
public
String
operate
(
String
newValue
,
String
oldValue
)
{
return
oldValue
;
}
@Override
public
Long
operate
(
Long
newValue
,
Long
oldValue
)
{
return
oldValue
;
}
@Override
public
Double
operate
(
Double
newValue
,
Double
oldValue
)
{
return
oldValue
;
}
@Override
public
Integer
operate
(
Integer
newValue
,
Integer
oldValue
)
{
return
oldValue
;
}
@Override
public
Boolean
operate
(
Boolean
newValue
,
Boolean
oldValue
)
{
return
oldValue
;
}
@Override
public
byte
[]
operate
(
byte
[]
newValue
,
byte
[]
oldValue
)
{
return
oldValue
;
}
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/global/GlobalTraceTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.global
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
GlobalTraceTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"global_trace"
;
public
static
final
String
COLUMN_SEGMENT_ID
=
"segment_id"
;
public
static
final
String
COLUMN_GLOBAL_TRACE_ID
=
"global_trace_id"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/instance/InstPerformanceTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.instance
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
InstPerformanceTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"instance_performance"
;
public
static
final
String
COLUMN_APPLICATION_ID
=
"application_id"
;
public
static
final
String
COLUMN_INSTANCE_ID
=
"instance_id"
;
public
static
final
String
COLUMN_CALLS
=
"calls"
;
public
static
final
String
COLUMN_COST_TOTAL
=
"cost_total"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/CpuMetricTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.jvm
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
CpuMetricTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"cpu_metric"
;
public
static
final
String
COLUMN_INSTANCE_ID
=
"instance_id"
;
public
static
final
String
COLUMN_USAGE_PERCENT
=
"usage_percent"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/GCMetricTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.jvm
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMetricTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"gc_metric"
;
public
static
final
String
COLUMN_INSTANCE_ID
=
"instance_id"
;
public
static
final
String
COLUMN_PHRASE
=
"phrase"
;
public
static
final
String
COLUMN_COUNT
=
"count"
;
public
static
final
String
COLUMN_TIME
=
"time"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/MemoryMetricTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.jvm
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
MemoryMetricTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"memory_metric"
;
public
static
final
String
COLUMN_APPLICATION_INSTANCE_ID
=
"application_instance_id"
;
public
static
final
String
COLUMN_IS_HEAP
=
"is_heap"
;
public
static
final
String
COLUMN_INIT
=
"init"
;
public
static
final
String
COLUMN_MAX
=
"max"
;
public
static
final
String
COLUMN_USED
=
"used"
;
public
static
final
String
COLUMN_COMMITTED
=
"committed"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/jvm/MemoryPoolMetricTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.jvm
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMetricTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"memory_pool_metric"
;
public
static
final
String
COLUMN_INSTANCE_ID
=
"instance_id"
;
public
static
final
String
COLUMN_POOL_TYPE
=
"pool_type"
;
public
static
final
String
COLUMN_INIT
=
"init"
;
public
static
final
String
COLUMN_MAX
=
"max"
;
public
static
final
String
COLUMN_USED
=
"used"
;
public
static
final
String
COLUMN_COMMITTED
=
"committed"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/node/NodeComponentTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.node
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
NodeComponentTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"node_component"
;
public
static
final
String
COLUMN_COMPONENT_ID
=
"component_id"
;
public
static
final
String
COLUMN_COMPONENT_NAME
=
"component_name"
;
public
static
final
String
COLUMN_PEER
=
"peer"
;
public
static
final
String
COLUMN_PEER_ID
=
"peer_id"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/node/NodeMappingTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.node
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
NodeMappingTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"node_mapping"
;
public
static
final
String
COLUMN_APPLICATION_ID
=
"application_id"
;
public
static
final
String
COLUMN_ADDRESS_ID
=
"address_id"
;
public
static
final
String
COLUMN_ADDRESS
=
"address"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/noderef/NodeReferenceTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.noderef
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
NodeReferenceTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"node_reference"
;
public
static
final
String
COLUMN_FRONT_APPLICATION_ID
=
"front_application_id"
;
public
static
final
String
COLUMN_BEHIND_APPLICATION_ID
=
"behind_application_id"
;
public
static
final
String
COLUMN_BEHIND_PEER
=
"behind_peer"
;
public
static
final
String
COLUMN_S1_LTE
=
"s1_lte"
;
public
static
final
String
COLUMN_S3_LTE
=
"s3_lte"
;
public
static
final
String
COLUMN_S5_LTE
=
"s5_lte"
;
public
static
final
String
COLUMN_S5_GT
=
"s5_gt"
;
public
static
final
String
COLUMN_SUMMARY
=
"summary"
;
public
static
final
String
COLUMN_ERROR
=
"error"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/register/ApplicationTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.register
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
ApplicationTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"application"
;
public
static
final
String
COLUMN_APPLICATION_CODE
=
"application_code"
;
public
static
final
String
COLUMN_APPLICATION_ID
=
"application_id"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/register/InstanceTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.register
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
InstanceTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"instance"
;
public
static
final
String
COLUMN_APPLICATION_ID
=
"application_id"
;
public
static
final
String
COLUMN_AGENT_UUID
=
"agent_uuid"
;
public
static
final
String
COLUMN_REGISTER_TIME
=
"register_time"
;
public
static
final
String
COLUMN_INSTANCE_ID
=
"instance_id"
;
public
static
final
String
COLUMN_HEARTBEAT_TIME
=
"heartbeat_time"
;
public
static
final
String
COLUMN_OS_INFO
=
"os_info"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/register/ServiceNameTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.register
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceNameTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"service_name"
;
public
static
final
String
COLUMN_SERVICE_NAME
=
"service_name"
;
public
static
final
String
COLUMN_APPLICATION_ID
=
"application_id"
;
public
static
final
String
COLUMN_SERVICE_ID
=
"service_id"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/segment/SegmentCostTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.segment
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
SegmentCostTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"segment_cost"
;
public
static
final
String
COLUMN_SEGMENT_ID
=
"segment_id"
;
public
static
final
String
COLUMN_APPLICATION_ID
=
"application_id"
;
public
static
final
String
COLUMN_START_TIME
=
"start_time"
;
public
static
final
String
COLUMN_END_TIME
=
"end_time"
;
public
static
final
String
COLUMN_SERVICE_NAME
=
"service_name"
;
public
static
final
String
COLUMN_COST
=
"cost"
;
public
static
final
String
COLUMN_IS_ERROR
=
"is_error"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/segment/SegmentTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.segment
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
SegmentTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"segment"
;
public
static
final
String
COLUMN_DATA_BINARY
=
"data_binary"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/service/ServiceEntryTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.service
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceEntryTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"service_entry"
;
public
static
final
String
COLUMN_APPLICATION_ID
=
"application_id"
;
public
static
final
String
COLUMN_ENTRY_SERVICE_ID
=
"entry_service_id"
;
public
static
final
String
COLUMN_ENTRY_SERVICE_NAME
=
"entry_service_name"
;
public
static
final
String
COLUMN_REGISTER_TIME
=
"register_time"
;
public
static
final
String
COLUMN_NEWEST_TIME
=
"newest_time"
;
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/skywalking/apm/collector/storage/table/serviceref/ServiceReferenceTable.java
0 → 100644
浏览文件 @
baa0a3c0
/*
* 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.storage.table.serviceref
;
import
org.skywalking.apm.collector.storage.define.CommonTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceTable
extends
CommonTable
{
public
static
final
String
TABLE
=
"service_reference"
;
public
static
final
String
COLUMN_ENTRY_SERVICE_ID
=
"entry_service_id"
;
public
static
final
String
COLUMN_ENTRY_SERVICE_NAME
=
"entry_service_name"
;
public
static
final
String
COLUMN_FRONT_SERVICE_ID
=
"front_service_id"
;
public
static
final
String
COLUMN_FRONT_SERVICE_NAME
=
"front_service_name"
;
public
static
final
String
COLUMN_BEHIND_SERVICE_ID
=
"behind_service_id"
;
public
static
final
String
COLUMN_BEHIND_SERVICE_NAME
=
"behind_service_name"
;
public
static
final
String
COLUMN_S1_LTE
=
"s1_lte"
;
public
static
final
String
COLUMN_S3_LTE
=
"s3_lte"
;
public
static
final
String
COLUMN_S5_LTE
=
"s5_lte"
;
public
static
final
String
COLUMN_S5_GT
=
"s5_gt"
;
public
static
final
String
COLUMN_SUMMARY
=
"summary"
;
public
static
final
String
COLUMN_COST_SUMMARY
=
"cost_summary"
;
public
static
final
String
COLUMN_ERROR
=
"error"
;
}
apm-collector/apm-collector-storage/pom.xml
浏览文件 @
baa0a3c0
...
...
@@ -28,5 +28,10 @@
<artifactId>
client-component
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.skywalking
</groupId>
<artifactId>
collector-remote-define
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModuleJettyProvider.java
浏览文件 @
baa0a3c0
...
...
@@ -67,7 +67,7 @@ public class UIModuleJettyProvider extends ModuleProvider {
jettyServer
.
addHandler
(
new
ApplicationsGetHandler
());
ModuleRegisterService
moduleRegisterService
=
getManager
().
find
(
ClusterModule
.
NAME
).
getService
(
ModuleRegisterService
.
class
);
moduleRegisterService
.
register
(
UIModule
.
NAME
,
this
.
name
(),
new
UIModuleRegistration
(
host
,
port
,
contextPath
));
moduleRegisterService
.
register
(
UIModule
.
NAME
,
this
.
name
(),
new
UIModule
Jetty
Registration
(
host
,
port
,
contextPath
));
UIJettyNamingListener
namingListener
=
new
UIJettyNamingListener
();
ModuleListenerService
moduleListenerService
=
getManager
().
find
(
ClusterModule
.
NAME
).
getService
(
ModuleListenerService
.
class
);
...
...
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModuleRegistration.java
→
apm-collector/apm-collector-ui/collector-ui-jetty-provider/src/main/java/org/skywalking/apm/collector/ui/jetty/UIModule
Jetty
Registration.java
浏览文件 @
baa0a3c0
...
...
@@ -23,13 +23,13 @@ import org.skywalking.apm.collector.cluster.ModuleRegistration;
/**
* @author peng-yongsheng
*/
public
class
UIModuleRegistration
extends
ModuleRegistration
{
public
class
UIModule
Jetty
Registration
extends
ModuleRegistration
{
private
final
String
host
;
private
final
int
port
;
private
final
String
contextPath
;
public
UIModuleRegistration
(
String
host
,
int
port
,
String
contextPath
)
{
public
UIModule
Jetty
Registration
(
String
host
,
int
port
,
String
contextPath
)
{
this
.
host
=
host
;
this
.
port
=
port
;
this
.
contextPath
=
contextPath
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录