Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
killuaz丶x
SkyWalking
提交
69bdfbad
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,发现更多精彩内容 >>
提交
69bdfbad
编写于
1月 09, 2018
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
GC metric pyramid aggregate test successful.
上级
1985fad1
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
321 addition
and
39 deletion
+321
-39
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java
...agent/grpc/provider/handler/JVMMetricsServiceHandler.java
+1
-1
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricServiceHandlerTestCase.java
...rpc/provider/handler/JVMMetricServiceHandlerTestCase.java
+11
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/service/GCMetricService.java
...lector/analysis/jvm/provider/service/GCMetricService.java
+6
-2
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCDayMetricTransformNode.java
...ysis/jvm/provider/worker/gc/GCDayMetricTransformNode.java
+4
-3
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCHourMetricTransformNode.java
...sis/jvm/provider/worker/gc/GCHourMetricTransformNode.java
+4
-3
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCMetricCopy.java
...llector/analysis/jvm/provider/worker/gc/GCMetricCopy.java
+42
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCMinuteMetricTransformNode.java
...s/jvm/provider/worker/gc/GCMinuteMetricTransformNode.java
+4
-3
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCMonthMetricTransformNode.java
...is/jvm/provider/worker/gc/GCMonthMetricTransformNode.java
+4
-3
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
...pache/skywalking/apm/collector/storage/StorageModule.java
+9
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/jvm/GCMetric.java
.../skywalking/apm/collector/storage/table/jvm/GCMetric.java
+6
-5
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/jvm/GCMetricTable.java
...alking/apm/collector/storage/table/jvm/GCMetricTable.java
+1
-2
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/StorageModuleEsProvider.java
...ing/apm/collector/storage/es/StorageModuleEsProvider.java
+13
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/gcmp/AbstractGCMetricEsPersistenceDAO.java
...storage/es/dao/gcmp/AbstractGCMetricEsPersistenceDAO.java
+14
-2
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/AbstractGCMetricEsTableDefine.java
...r/storage/es/define/gc/AbstractGCMetricEsTableDefine.java
+9
-12
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCDayMetricEsTableDefine.java
...lector/storage/es/define/gc/GCDayMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCHourMetricEsTableDefine.java
...ector/storage/es/define/gc/GCHourMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCMinuteMetricEsTableDefine.java
...tor/storage/es/define/gc/GCMinuteMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCMonthMetricEsTableDefine.java
...ctor/storage/es/define/gc/GCMonthMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCSecondMetricEsTableDefine.java
...tor/storage/es/define/gc/GCSecondMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define
...ovider/src/main/resources/META-INF/defines/storage.define
+7
-1
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/GCSecondMetricH2PersistenceDAO.java
...lector/storage/h2/dao/GCSecondMetricH2PersistenceDAO.java
+0
-1
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/GCMetricH2TableDefine.java
...pm/collector/storage/h2/define/GCMetricH2TableDefine.java
+1
-1
未找到文件。
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/main/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricsServiceHandler.java
浏览文件 @
69bdfbad
...
...
@@ -70,7 +70,7 @@ public class JVMMetricsServiceHandler extends JVMMetricsServiceGrpc.JVMMetricsSe
// sendToCpuMetricService(instanceId, time, metric.getCpu());
sendToMemoryMetricService
(
instanceId
,
time
,
metric
.
getMemoryList
());
sendToMemoryPoolMetricService
(
instanceId
,
time
,
metric
.
getMemoryPoolList
());
//
sendToGCMetricService(instanceId, time, metric.getGcList());
sendToGCMetricService
(
instanceId
,
time
,
metric
.
getGcList
());
});
responseObserver
.
onNext
(
Downstream
.
newBuilder
().
build
());
...
...
apm-collector/apm-collector-agent/agent-grpc/agent-grpc-provider/src/test/java/org/apache/skywalking/apm/collector/agent/grpc/provider/handler/JVMMetricServiceHandlerTestCase.java
浏览文件 @
69bdfbad
...
...
@@ -20,6 +20,8 @@ package org.apache.skywalking.apm.collector.agent.grpc.provider.handler;
import
io.grpc.ManagedChannel
;
import
io.grpc.ManagedChannelBuilder
;
import
org.apache.skywalking.apm.network.proto.GC
;
import
org.apache.skywalking.apm.network.proto.GCPhrase
;
import
org.apache.skywalking.apm.network.proto.JVMMetric
;
import
org.apache.skywalking.apm.network.proto.JVMMetrics
;
import
org.apache.skywalking.apm.network.proto.JVMMetricsServiceGrpc
;
...
...
@@ -42,6 +44,7 @@ public class JVMMetricServiceHandlerTestCase {
JVMMetric
.
Builder
metricBuilder
=
JVMMetric
.
newBuilder
();
metricBuilder
.
setTime
(
System
.
currentTimeMillis
());
buildGCMetric
(
metricBuilder
);
buildMemoryMetric
(
metricBuilder
);
buildMemoryPoolMetric
(
metricBuilder
);
...
...
@@ -71,4 +74,12 @@ public class JVMMetricServiceHandlerTestCase {
metricBuilder
.
addMemory
(
builder
);
}
private
static
void
buildGCMetric
(
JVMMetric
.
Builder
metricBuilder
)
{
GC
.
Builder
builder
=
GC
.
newBuilder
();
builder
.
setPhrase
(
GCPhrase
.
NEW
);
builder
.
setCount
(
2
);
metricBuilder
.
addGc
(
builder
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/service/GCMetricService.java
浏览文件 @
69bdfbad
...
...
@@ -45,12 +45,16 @@ public class GCMetricService implements IGCMetricService {
}
@Override
public
void
send
(
int
instanceId
,
long
timeBucket
,
int
phraseValue
,
long
count
,
long
time
)
{
String
metricId
=
instanceId
+
Const
.
ID_SPLIT
+
String
.
valueOf
(
phraseValue
);
String
id
=
timeBucket
+
Const
.
ID_SPLIT
+
metricId
;
GCMetric
gcMetric
=
new
GCMetric
();
gcMetric
.
setId
(
timeBucket
+
Const
.
ID_SPLIT
+
instanceId
+
Const
.
ID_SPLIT
+
String
.
valueOf
(
phraseValue
));
gcMetric
.
setId
(
id
);
gcMetric
.
setMetricId
(
metricId
);
gcMetric
.
setInstanceId
(
instanceId
);
gcMetric
.
setPhrase
(
phraseValue
);
gcMetric
.
setCount
(
count
);
gcMetric
.
setTime
(
time
);
gcMetric
.
setTime
s
(
1L
);
gcMetric
.
setTimeBucket
(
timeBucket
);
logger
.
debug
(
"push to gc metric graph, id: {}"
,
gcMetric
.
getId
());
...
...
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCDayMetricTransformNode.java
浏览文件 @
69bdfbad
...
...
@@ -36,9 +36,10 @@ public class GCDayMetricTransformNode implements NodeProcessor<GCMetric, GCMetri
@Override
public
void
process
(
GCMetric
gcMetric
,
Next
<
GCMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToDay
(
gcMetric
.
getTimeBucket
());
gcMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
gcMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
gcMetric
);
GCMetric
newGCMetric
=
GCMetricCopy
.
copy
(
gcMetric
);
newGCMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
newGCMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newGCMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCHourMetricTransformNode.java
浏览文件 @
69bdfbad
...
...
@@ -36,9 +36,10 @@ public class GCHourMetricTransformNode implements NodeProcessor<GCMetric, GCMetr
@Override
public
void
process
(
GCMetric
gcMetric
,
Next
<
GCMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToHour
(
gcMetric
.
getTimeBucket
());
gcMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
gcMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
gcMetric
);
GCMetric
newGCMetric
=
GCMetricCopy
.
copy
(
gcMetric
);
newGCMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
newGCMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newGCMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCMetricCopy.java
0 → 100644
浏览文件 @
69bdfbad
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.gc
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetric
;
/**
* @author peng-yongsheng
*/
public
class
GCMetricCopy
{
public
static
GCMetric
copy
(
GCMetric
gcMetric
)
{
GCMetric
newGCMetric
=
new
GCMetric
();
newGCMetric
.
setId
(
gcMetric
.
getId
());
newGCMetric
.
setMetricId
(
gcMetric
.
getMetricId
());
newGCMetric
.
setInstanceId
(
gcMetric
.
getInstanceId
());
newGCMetric
.
setPhrase
(
gcMetric
.
getPhrase
());
newGCMetric
.
setCount
(
gcMetric
.
getCount
());
newGCMetric
.
setTimes
(
gcMetric
.
getTimes
());
newGCMetric
.
setTimeBucket
(
gcMetric
.
getTimeBucket
());
return
newGCMetric
;
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCMinuteMetricTransformNode.java
浏览文件 @
69bdfbad
...
...
@@ -36,9 +36,10 @@ public class GCMinuteMetricTransformNode implements NodeProcessor<GCMetric, GCMe
@Override
public
void
process
(
GCMetric
gcMetric
,
Next
<
GCMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToMinute
(
gcMetric
.
getTimeBucket
());
gcMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
gcMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
gcMetric
);
GCMetric
newGCMetric
=
GCMetricCopy
.
copy
(
gcMetric
);
newGCMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
newGCMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newGCMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/gc/GCMonthMetricTransformNode.java
浏览文件 @
69bdfbad
...
...
@@ -36,9 +36,10 @@ public class GCMonthMetricTransformNode implements NodeProcessor<GCMetric, GCMet
@Override
public
void
process
(
GCMetric
gcMetric
,
Next
<
GCMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToMonth
(
gcMetric
.
getTimeBucket
());
gcMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
gcMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
gcMetric
);
GCMetric
newGCMetric
=
GCMetricCopy
.
copy
(
gcMetric
);
newGCMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
gcMetric
.
getMetricId
());
newGCMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newGCMetric
);
}
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
浏览文件 @
69bdfbad
...
...
@@ -72,6 +72,10 @@ import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
import
org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cache.IServiceNameCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceHourMetricPersistenceDAO
;
...
...
@@ -148,7 +152,12 @@ public class StorageModule extends Module {
private
void
addPersistenceDAO
(
List
<
Class
>
classes
)
{
classes
.
add
(
ICpuSecondMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCSecondMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCMinuteMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCHourMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCDayMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCMonthMetricPersistenceDAO
.
class
);
classes
.
add
(
IMemorySecondMetricPersistenceDAO
.
class
);
classes
.
add
(
IMemoryMinuteMetricPersistenceDAO
.
class
);
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/jvm/GCMetric.java
浏览文件 @
69bdfbad
...
...
@@ -20,6 +20,7 @@ package org.apache.skywalking.apm.collector.storage.table.jvm;
import
org.apache.skywalking.apm.collector.core.data.Column
;
import
org.apache.skywalking.apm.collector.core.data.StreamData
;
import
org.apache.skywalking.apm.collector.core.data.operator.AddOperation
;
import
org.apache.skywalking.apm.collector.core.data.operator.CoverOperation
;
import
org.apache.skywalking.apm.collector.core.data.operator.NonOperation
;
...
...
@@ -34,8 +35,8 @@ public class GCMetric extends StreamData {
};
private
static
final
Column
[]
LONG_COLUMNS
=
{
new
Column
(
GCMetricTable
.
COLUMN_COUNT
,
new
Cover
Operation
()),
new
Column
(
GCMetricTable
.
COLUMN_TIME
,
new
Cover
Operation
()),
new
Column
(
GCMetricTable
.
COLUMN_COUNT
,
new
Add
Operation
()),
new
Column
(
GCMetricTable
.
COLUMN_TIME
S
,
new
Add
Operation
()),
new
Column
(
GCMetricTable
.
COLUMN_TIME_BUCKET
,
new
CoverOperation
()),
};
...
...
@@ -78,12 +79,12 @@ public class GCMetric extends StreamData {
setDataLong
(
0
,
count
);
}
public
Long
getTime
()
{
public
Long
getTime
s
()
{
return
getDataLong
(
1
);
}
public
void
setTime
(
Long
time
)
{
setDataLong
(
1
,
time
);
public
void
setTime
s
(
Long
times
)
{
setDataLong
(
1
,
time
s
);
}
public
Long
getTimeBucket
()
{
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/jvm/GCMetricTable.java
浏览文件 @
69bdfbad
...
...
@@ -16,7 +16,6 @@
*
*/
package
org.apache.skywalking.apm.collector.storage.table.jvm
;
import
org.apache.skywalking.apm.collector.core.data.CommonTable
;
...
...
@@ -29,5 +28,5 @@ public class GCMetricTable extends CommonTable {
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
"
;
public
static
final
String
COLUMN_TIME
S
=
"times
"
;
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/StorageModuleEsProvider.java
浏览文件 @
69bdfbad
...
...
@@ -81,6 +81,10 @@ import org.apache.skywalking.apm.collector.storage.dao.cache.IInstanceCacheDAO;
import
org.apache.skywalking.apm.collector.storage.dao.cache.INetworkAddressCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cache.IServiceNameCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceHourMetricPersistenceDAO
;
...
...
@@ -168,6 +172,10 @@ import org.apache.skywalking.apm.collector.storage.es.dao.cache.InstanceEsCacheD
import
org.apache.skywalking.apm.collector.storage.es.dao.cache.NetworkAddressEsCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.cache.ServiceNameEsCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.cpump.CpuSecondMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.gcmp.GCDayMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.gcmp.GCHourMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.gcmp.GCMinuteMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.gcmp.GCMonthMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.gcmp.GCSecondMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.imp.InstanceDayMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.imp.InstanceHourMetricEsPersistenceDAO
;
...
...
@@ -294,7 +302,12 @@ public class StorageModuleEsProvider extends ModuleProvider {
private
void
registerPersistenceDAO
()
throws
ServiceNotProvidedException
{
this
.
registerServiceImplementation
(
ICpuSecondMetricPersistenceDAO
.
class
,
new
CpuSecondMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IGCSecondMetricPersistenceDAO
.
class
,
new
GCSecondMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IGCMinuteMetricPersistenceDAO
.
class
,
new
GCMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IGCHourMetricPersistenceDAO
.
class
,
new
GCHourMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IGCDayMetricPersistenceDAO
.
class
,
new
GCDayMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IGCMonthMetricPersistenceDAO
.
class
,
new
GCMonthMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IMemorySecondMetricPersistenceDAO
.
class
,
new
MemorySecondMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IMemoryMinuteMetricPersistenceDAO
.
class
,
new
MemoryMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/gcmp/AbstractGCMetricEsPersistenceDAO.java
浏览文件 @
69bdfbad
...
...
@@ -39,7 +39,19 @@ public abstract class AbstractGCMetricEsPersistenceDAO extends AbstractPersisten
}
@Override
protected
final
GCMetric
esDataToStreamData
(
Map
<
String
,
Object
>
source
)
{
return
null
;
GCMetric
gcMetric
=
new
GCMetric
();
gcMetric
.
setId
((
String
)
source
.
get
(
GCMetricTable
.
COLUMN_ID
));
gcMetric
.
setMetricId
((
String
)
source
.
get
(
GCMetricTable
.
COLUMN_METRIC_ID
));
gcMetric
.
setInstanceId
(((
Number
)
source
.
get
(
GCMetricTable
.
COLUMN_INSTANCE_ID
)).
intValue
());
gcMetric
.
setPhrase
(((
Number
)
source
.
get
(
GCMetricTable
.
COLUMN_PHRASE
)).
intValue
());
gcMetric
.
setCount
(((
Number
)
source
.
get
(
GCMetricTable
.
COLUMN_COUNT
)).
longValue
());
gcMetric
.
setTimes
(((
Number
)
source
.
get
(
GCMetricTable
.
COLUMN_TIMES
)).
longValue
());
gcMetric
.
setTimeBucket
(((
Number
)
source
.
get
(
GCMetricTable
.
COLUMN_TIME_BUCKET
)).
longValue
());
return
gcMetric
;
}
@Override
protected
final
Map
<
String
,
Object
>
esStreamDataToEsData
(
GCMetric
streamData
)
{
...
...
@@ -50,7 +62,7 @@ public abstract class AbstractGCMetricEsPersistenceDAO extends AbstractPersisten
source
.
put
(
GCMetricTable
.
COLUMN_INSTANCE_ID
,
streamData
.
getInstanceId
());
source
.
put
(
GCMetricTable
.
COLUMN_PHRASE
,
streamData
.
getPhrase
());
source
.
put
(
GCMetricTable
.
COLUMN_COUNT
,
streamData
.
getCount
());
source
.
put
(
GCMetricTable
.
COLUMN_TIME
,
streamData
.
getTime
());
source
.
put
(
GCMetricTable
.
COLUMN_TIME
S
,
streamData
.
getTimes
());
source
.
put
(
GCMetricTable
.
COLUMN_TIME_BUCKET
,
streamData
.
getTimeBucket
());
return
source
;
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/GCMetricEsTableDefine.java
→
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/
gc/Abstract
GCMetricEsTableDefine.java
浏览文件 @
69bdfbad
...
...
@@ -16,31 +16,28 @@
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define
;
package
org.apache.skywalking.apm.collector.storage.es.define.gc
;
import
org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchColumnDefine
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
import
org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchTableDefine
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMetricEsTableDefine
extends
ElasticSearchTableDefine
{
public
GCMetricEsTableDefine
()
{
super
(
GCMetricTable
.
TABLE
);
}
public
abstract
class
AbstractGCMetricEsTableDefine
extends
ElasticSearchTableDefine
{
@Override
public
int
refreshInterval
(
)
{
return
1
;
public
AbstractGCMetricEsTableDefine
(
String
name
)
{
super
(
name
)
;
}
@Override
public
void
initialize
()
{
@Override
public
final
void
initialize
()
{
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_ID
,
ElasticSearchColumnDefine
.
Type
.
Keyword
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_METRIC_ID
,
ElasticSearchColumnDefine
.
Type
.
Keyword
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_INSTANCE_ID
,
ElasticSearchColumnDefine
.
Type
.
Integer
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_PHRASE
,
ElasticSearchColumnDefine
.
Type
.
Integer
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_COUNT
,
ElasticSearchColumnDefine
.
Type
.
Long
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_TIME
,
ElasticSearchColumnDefine
.
Type
.
Long
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_TIME
S
,
ElasticSearchColumnDefine
.
Type
.
Long
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
GCMetricTable
.
COLUMN_TIME_BUCKET
,
ElasticSearchColumnDefine
.
Type
.
Long
.
name
()));
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCDayMetricEsTableDefine.java
0 → 100644
浏览文件 @
69bdfbad
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.gc
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCDayMetricEsTableDefine
extends
AbstractGCMetricEsTableDefine
{
public
GCDayMetricEsTableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Day
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
1
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCHourMetricEsTableDefine.java
0 → 100644
浏览文件 @
69bdfbad
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.gc
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCHourMetricEsTableDefine
extends
AbstractGCMetricEsTableDefine
{
public
GCHourMetricEsTableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Hour
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
1
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCMinuteMetricEsTableDefine.java
0 → 100644
浏览文件 @
69bdfbad
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.gc
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMinuteMetricEsTableDefine
extends
AbstractGCMetricEsTableDefine
{
public
GCMinuteMetricEsTableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Minute
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
1
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCMonthMetricEsTableDefine.java
0 → 100644
浏览文件 @
69bdfbad
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.gc
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCMonthMetricEsTableDefine
extends
AbstractGCMetricEsTableDefine
{
public
GCMonthMetricEsTableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Month
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
1
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/gc/GCSecondMetricEsTableDefine.java
0 → 100644
浏览文件 @
69bdfbad
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.gc
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.GCMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
GCSecondMetricEsTableDefine
extends
AbstractGCMetricEsTableDefine
{
public
GCSecondMetricEsTableDefine
()
{
super
(
GCMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Second
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
1
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define
浏览文件 @
69bdfbad
...
...
@@ -75,4 +75,10 @@ org.apache.skywalking.apm.collector.storage.es.define.memory.MemorySecondMetricE
org.apache.skywalking.apm.collector.storage.es.define.memory.MemoryMinuteMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.memory.MemoryHourMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.memory.MemoryDayMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.memory.MemoryMonthMetricEsTableDefine
\ No newline at end of file
org.apache.skywalking.apm.collector.storage.es.define.memory.MemoryMonthMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.gc.GCSecondMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.gc.GCMinuteMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.gc.GCHourMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.gc.GCDayMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.gc.GCMonthMetricEsTableDefine
\ No newline at end of file
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/GCSecondMetricH2PersistenceDAO.java
浏览文件 @
69bdfbad
...
...
@@ -49,7 +49,6 @@ public class GCSecondMetricH2PersistenceDAO extends H2DAO implements IGCSecondMe
source
.
put
(
GCMetricTable
.
COLUMN_INSTANCE_ID
,
data
.
getInstanceId
());
source
.
put
(
GCMetricTable
.
COLUMN_PHRASE
,
data
.
getPhrase
());
source
.
put
(
GCMetricTable
.
COLUMN_COUNT
,
data
.
getCount
());
source
.
put
(
GCMetricTable
.
COLUMN_TIME
,
data
.
getTime
());
source
.
put
(
GCMetricTable
.
COLUMN_TIME_BUCKET
,
data
.
getTimeBucket
());
String
sql
=
SqlBuilder
.
buildBatchInsertSql
(
GCMetricTable
.
TABLE
,
source
.
keySet
());
...
...
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/define/GCMetricH2TableDefine.java
浏览文件 @
69bdfbad
...
...
@@ -37,7 +37,7 @@ public class GCMetricH2TableDefine extends H2TableDefine {
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_INSTANCE_ID
,
H2ColumnDefine
.
Type
.
Int
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_PHRASE
,
H2ColumnDefine
.
Type
.
Int
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_COUNT
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_TIME
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_TIME
S
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
addColumn
(
new
H2ColumnDefine
(
GCMetricTable
.
COLUMN_TIME_BUCKET
,
H2ColumnDefine
.
Type
.
Bigint
.
name
()));
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录