Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
63e9c54f
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
63e9c54f
编写于
1月 08, 2018
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Memory pool metric pyramid aggregate.
上级
2428e8a8
变更
31
隐藏空白更改
内联
并排
Showing
31 changed file
with
940 addition
and
112 deletion
+940
-112
apm-collector/apm-collector-analysis/analysis-jvm/jvm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/define/graph/WorkerIdDefine.java
...m/collector/analysis/jvm/define/graph/WorkerIdDefine.java
+11
-1
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/AnalysisJVMModuleProvider.java
...ctor/analysis/jvm/provider/AnalysisJVMModuleProvider.java
+1
-1
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolDayMetricPersistenceWorker.java
...rker/memorypool/MemoryPoolDayMetricPersistenceWorker.java
+67
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolDayMetricTransformNode.java
...r/worker/memorypool/MemoryPoolDayMetricTransformNode.java
+44
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolHourMetricPersistenceWorker.java
...ker/memorypool/MemoryPoolHourMetricPersistenceWorker.java
+67
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolHourMetricTransformNode.java
.../worker/memorypool/MemoryPoolHourMetricTransformNode.java
+44
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMetricBridgeNode.java
...rovider/worker/memorypool/MemoryPoolMetricBridgeNode.java
+38
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMetricPersistenceGraph.java
...r/worker/memorypool/MemoryPoolMetricPersistenceGraph.java
+18
-3
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMinuteMetricPersistenceWorker.java
...r/memorypool/MemoryPoolMinuteMetricPersistenceWorker.java
+67
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMinuteMetricTransformNode.java
...orker/memorypool/MemoryPoolMinuteMetricTransformNode.java
+44
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMonthMetricPersistenceWorker.java
...er/memorypool/MemoryPoolMonthMetricPersistenceWorker.java
+67
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMonthMetricTransformNode.java
...worker/memorypool/MemoryPoolMonthMetricTransformNode.java
+44
-0
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolSecondMetricPersistenceWorker.java
...r/memorypool/MemoryPoolSecondMetricPersistenceWorker.java
+9
-9
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
+2
-2
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolDayMetricPersistenceDAO.java
...orage/dao/mpoolmp/IMemoryPoolDayMetricPersistenceDAO.java
+2
-2
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolHourMetricPersistenceDAO.java
...rage/dao/mpoolmp/IMemoryPoolHourMetricPersistenceDAO.java
+28
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolMinuteMetricPersistenceDAO.java
...ge/dao/mpoolmp/IMemoryPoolMinuteMetricPersistenceDAO.java
+28
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolMonthMetricPersistenceDAO.java
...age/dao/mpoolmp/IMemoryPoolMonthMetricPersistenceDAO.java
+28
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolSecondMetricPersistenceDAO.java
...ge/dao/mpoolmp/IMemoryPoolSecondMetricPersistenceDAO.java
+28
-0
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/jvm/MemoryPoolMetric.java
...ing/apm/collector/storage/table/jvm/MemoryPoolMetric.java
+22
-5
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/DataTTLKeeperTimer.java
...ywalking/apm/collector/storage/es/DataTTLKeeperTimer.java
+2
-1
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
+3
-3
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/MemoryPoolMetricEsPersistenceDAO.java
...ctor/storage/es/dao/MemoryPoolMetricEsPersistenceDAO.java
+0
-79
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/AbstractMemoryPoolMetricEsPersistenceDAO.java
...dao/mpoolmp/AbstractMemoryPoolMetricEsPersistenceDAO.java
+60
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolDayMetricEsPersistenceDAO.java
...e/es/dao/mpoolmp/MemoryPoolDayMetricEsPersistenceDAO.java
+42
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolHourMetricEsPersistenceDAO.java
.../es/dao/mpoolmp/MemoryPoolHourMetricEsPersistenceDAO.java
+42
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolMinuteMetricEsPersistenceDAO.java
...s/dao/mpoolmp/MemoryPoolMinuteMetricEsPersistenceDAO.java
+42
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolMonthMetricEsPersistenceDAO.java
...es/dao/mpoolmp/MemoryPoolMonthMetricEsPersistenceDAO.java
+42
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolSecondMetricEsPersistenceDAO.java
...s/dao/mpoolmp/MemoryPoolSecondMetricEsPersistenceDAO.java
+42
-0
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/StorageModuleH2Provider.java
...ing/apm/collector/storage/h2/StorageModuleH2Provider.java
+3
-3
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/MemoryPoolSecondMetricH2PersistenceDAO.java
...torage/h2/dao/MemoryPoolSecondMetricH2PersistenceDAO.java
+3
-3
未找到文件。
apm-collector/apm-collector-analysis/analysis-jvm/jvm-define/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/define/graph/WorkerIdDefine.java
浏览文件 @
63e9c54f
...
...
@@ -55,6 +55,16 @@ public class WorkerIdDefine {
public
static
final
int
MEMORY_MONTH_METRIC_PERSISTENCE_WORKER_ID
=
3208
;
public
static
final
int
MEMORY_MONTH_METRIC_TRANSFORM_NODE_ID
=
3209
;
public
static
final
int
MEMORY_POOL_METRIC_BRIDGE_NODE_ID
=
3300
;
public
static
final
int
MEMORY_POOL_SECOND_METRIC_PERSISTENCE_WORKER_ID
=
3301
;
public
static
final
int
MEMORY_POOL_MINUTE_METRIC_PERSISTENCE_WORKER_ID
=
3302
;
public
static
final
int
MEMORY_POOL_MINUTE_METRIC_TRANSFORM_NODE_ID
=
3303
;
public
static
final
int
MEMORY_POOL_HOUR_METRIC_PERSISTENCE_WORKER_ID
=
3304
;
public
static
final
int
MEMORY_POOL_HOUR_METRIC_TRANSFORM_NODE_ID
=
3305
;
public
static
final
int
MEMORY_POOL_DAY_METRIC_PERSISTENCE_WORKER_ID
=
3306
;
public
static
final
int
MEMORY_POOL_DAY_METRIC_TRANSFORM_NODE_ID
=
3307
;
public
static
final
int
MEMORY_POOL_MONTH_METRIC_PERSISTENCE_WORKER_ID
=
3308
;
public
static
final
int
MEMORY_POOL_MONTH_METRIC_TRANSFORM_NODE_ID
=
3309
;
public
static
final
int
INST_HEART_BEAT_PERSISTENCE_WORKER_ID
=
302
;
public
static
final
int
MEMORY_POOL_METRIC_PERSISTENCE_WORKER_ID
=
303
;
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/AnalysisJVMModuleProvider.java
浏览文件 @
63e9c54f
...
...
@@ -34,7 +34,7 @@ import org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.cpu.CpuM
import
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.gc.GCMetricPersistenceGraph
;
import
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.InstanceHeartBeatPersistenceGraph
;
import
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.memory.MemoryMetricPersistenceGraph
;
import
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.MemoryPoolMetricPersistenceGraph
;
import
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker.
memorypool.
MemoryPoolMetricPersistenceGraph
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener
;
import
org.apache.skywalking.apm.collector.analysis.worker.timer.PersistenceTimer
;
import
org.apache.skywalking.apm.collector.core.module.Module
;
...
...
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolDayMetricPersistenceWorker.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolDayMetricPersistenceWorker
extends
PersistenceWorker
<
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_DAY_METRIC_PERSISTENCE_WORKER_ID
;
}
public
MemoryPoolDayMetricPersistenceWorker
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
protected
boolean
needMergeDBData
()
{
return
true
;
}
@SuppressWarnings
(
"unchecked"
)
@Override
protected
IPersistenceDAO
<?,
?,
MemoryPoolMetric
>
persistenceDAO
()
{
return
getModuleManager
().
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPoolDayMetricPersistenceDAO
.
class
);
}
public
static
class
Factory
extends
PersistenceWorkerProvider
<
MemoryPoolMetric
,
MemoryPoolDayMetricPersistenceWorker
>
{
public
Factory
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
public
MemoryPoolDayMetricPersistenceWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
MemoryPoolDayMetricPersistenceWorker
(
moduleManager
);
}
@Override
public
int
queueSize
()
{
return
1024
;
}
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolDayMetricTransformNode.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.core.graph.Next
;
import
org.apache.skywalking.apm.collector.core.graph.NodeProcessor
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolDayMetricTransformNode
implements
NodeProcessor
<
MemoryPoolMetric
,
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_DAY_METRIC_TRANSFORM_NODE_ID
;
}
@Override
public
void
process
(
MemoryPoolMetric
memoryPoolMetric
,
Next
<
MemoryPoolMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToDay
(
memoryPoolMetric
.
getTimeBucket
());
memoryPoolMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
memoryPoolMetric
.
getMetricId
());
memoryPoolMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
memoryPoolMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolHourMetricPersistenceWorker.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolHourMetricPersistenceWorker
extends
PersistenceWorker
<
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_HOUR_METRIC_PERSISTENCE_WORKER_ID
;
}
public
MemoryPoolHourMetricPersistenceWorker
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
protected
boolean
needMergeDBData
()
{
return
true
;
}
@SuppressWarnings
(
"unchecked"
)
@Override
protected
IPersistenceDAO
<?,
?,
MemoryPoolMetric
>
persistenceDAO
()
{
return
getModuleManager
().
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPoolHourMetricPersistenceDAO
.
class
);
}
public
static
class
Factory
extends
PersistenceWorkerProvider
<
MemoryPoolMetric
,
MemoryPoolHourMetricPersistenceWorker
>
{
public
Factory
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
public
MemoryPoolHourMetricPersistenceWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
MemoryPoolHourMetricPersistenceWorker
(
moduleManager
);
}
@Override
public
int
queueSize
()
{
return
1024
;
}
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolHourMetricTransformNode.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.core.graph.Next
;
import
org.apache.skywalking.apm.collector.core.graph.NodeProcessor
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolHourMetricTransformNode
implements
NodeProcessor
<
MemoryPoolMetric
,
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_HOUR_METRIC_TRANSFORM_NODE_ID
;
}
@Override
public
void
process
(
MemoryPoolMetric
memoryPoolMetric
,
Next
<
MemoryPoolMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToHour
(
memoryPoolMetric
.
getTimeBucket
());
memoryPoolMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
memoryPoolMetric
.
getMetricId
());
memoryPoolMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
memoryPoolMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMetricBridgeNode.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.core.graph.Next
;
import
org.apache.skywalking.apm.collector.core.graph.NodeProcessor
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMetricBridgeNode
implements
NodeProcessor
<
MemoryPoolMetric
,
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_METRIC_BRIDGE_NODE_ID
;
}
@Override
public
void
process
(
MemoryPoolMetric
metric
,
Next
<
MemoryPoolMetric
>
next
)
{
next
.
execute
(
metric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/MemoryPoolMetricPersistenceGraph.java
→
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/
memorypool/
MemoryPoolMetricPersistenceGraph.java
浏览文件 @
63e9c54f
...
...
@@ -16,11 +16,12 @@
*
*/
package
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker
;
package
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker
.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.GraphIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener
;
import
org.apache.skywalking.apm.collector.core.graph.GraphManager
;
import
org.apache.skywalking.apm.collector.core.graph.Node
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
...
...
@@ -38,7 +39,21 @@ public class MemoryPoolMetricPersistenceGraph {
}
public
void
create
()
{
GraphManager
.
INSTANCE
.
createIfAbsent
(
GraphIdDefine
.
MEMORY_POOL_METRIC_PERSISTENCE_GRAPH_ID
,
MemoryPoolMetric
.
class
)
.
addNode
(
new
MemoryPoolMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
Node
<
MemoryPoolMetric
,
MemoryPoolMetric
>
bridgeNode
=
GraphManager
.
INSTANCE
.
createIfAbsent
(
GraphIdDefine
.
MEMORY_POOL_METRIC_PERSISTENCE_GRAPH_ID
,
MemoryPoolMetric
.
class
)
.
addNode
(
new
MemoryPoolMetricBridgeNode
());
bridgeNode
.
addNext
(
new
MemoryPoolSecondMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
bridgeNode
.
addNext
(
new
MemoryPoolMinuteMetricTransformNode
())
.
addNext
(
new
MemoryPoolMinuteMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
bridgeNode
.
addNext
(
new
MemoryPoolHourMetricTransformNode
())
.
addNext
(
new
MemoryPoolHourMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
bridgeNode
.
addNext
(
new
MemoryPoolDayMetricTransformNode
())
.
addNext
(
new
MemoryPoolDayMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
bridgeNode
.
addNext
(
new
MemoryPoolMonthMetricTransformNode
())
.
addNext
(
new
MemoryPoolMonthMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMinuteMetricPersistenceWorker.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMinuteMetricPersistenceWorker
extends
PersistenceWorker
<
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_MINUTE_METRIC_PERSISTENCE_WORKER_ID
;
}
public
MemoryPoolMinuteMetricPersistenceWorker
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
protected
boolean
needMergeDBData
()
{
return
true
;
}
@SuppressWarnings
(
"unchecked"
)
@Override
protected
IPersistenceDAO
<?,
?,
MemoryPoolMetric
>
persistenceDAO
()
{
return
getModuleManager
().
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPoolMinuteMetricPersistenceDAO
.
class
);
}
public
static
class
Factory
extends
PersistenceWorkerProvider
<
MemoryPoolMetric
,
MemoryPoolMinuteMetricPersistenceWorker
>
{
public
Factory
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
public
MemoryPoolMinuteMetricPersistenceWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
MemoryPoolMinuteMetricPersistenceWorker
(
moduleManager
);
}
@Override
public
int
queueSize
()
{
return
1024
;
}
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMinuteMetricTransformNode.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.core.graph.Next
;
import
org.apache.skywalking.apm.collector.core.graph.NodeProcessor
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMinuteMetricTransformNode
implements
NodeProcessor
<
MemoryPoolMetric
,
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_MINUTE_METRIC_TRANSFORM_NODE_ID
;
}
@Override
public
void
process
(
MemoryPoolMetric
memoryPoolMetric
,
Next
<
MemoryPoolMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToMinute
(
memoryPoolMetric
.
getTimeBucket
());
memoryPoolMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
memoryPoolMetric
.
getMetricId
());
memoryPoolMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
memoryPoolMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMonthMetricPersistenceWorker.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorkerProvider
;
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMonthMetricPersistenceWorker
extends
PersistenceWorker
<
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_MONTH_METRIC_PERSISTENCE_WORKER_ID
;
}
public
MemoryPoolMonthMetricPersistenceWorker
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
protected
boolean
needMergeDBData
()
{
return
true
;
}
@SuppressWarnings
(
"unchecked"
)
@Override
protected
IPersistenceDAO
<?,
?,
MemoryPoolMetric
>
persistenceDAO
()
{
return
getModuleManager
().
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPoolMonthMetricPersistenceDAO
.
class
);
}
public
static
class
Factory
extends
PersistenceWorkerProvider
<
MemoryPoolMetric
,
MemoryPoolMonthMetricPersistenceWorker
>
{
public
Factory
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
public
MemoryPoolMonthMetricPersistenceWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
MemoryPoolMonthMetricPersistenceWorker
(
moduleManager
);
}
@Override
public
int
queueSize
()
{
return
1024
;
}
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/memorypool/MemoryPoolMonthMetricTransformNode.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.core.graph.Next
;
import
org.apache.skywalking.apm.collector.core.graph.NodeProcessor
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMonthMetricTransformNode
implements
NodeProcessor
<
MemoryPoolMetric
,
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_MONTH_METRIC_TRANSFORM_NODE_ID
;
}
@Override
public
void
process
(
MemoryPoolMetric
memoryPoolMetric
,
Next
<
MemoryPoolMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
secondToMonth
(
memoryPoolMetric
.
getTimeBucket
());
memoryPoolMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
memoryPoolMetric
.
getMetricId
());
memoryPoolMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
memoryPoolMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/
MemoryPool
MetricPersistenceWorker.java
→
apm-collector/apm-collector-analysis/analysis-jvm/jvm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/jvm/provider/worker/
memorypool/MemoryPoolSecond
MetricPersistenceWorker.java
浏览文件 @
63e9c54f
...
...
@@ -16,7 +16,7 @@
*
*/
package
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker
;
package
org.apache.skywalking.apm.collector.analysis.jvm.provider.worker
.memorypool
;
import
org.apache.skywalking.apm.collector.analysis.jvm.define.graph.WorkerIdDefine
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.impl.PersistenceWorker
;
...
...
@@ -24,19 +24,19 @@ import org.apache.skywalking.apm.collector.analysis.worker.model.impl.Persistenc
import
org.apache.skywalking.apm.collector.core.module.ModuleManager
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
IMemoryPool
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
mpoolmp.IMemoryPoolSecond
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMetricPersistenceWorker
extends
PersistenceWorker
<
MemoryPoolMetric
>
{
public
class
MemoryPool
Second
MetricPersistenceWorker
extends
PersistenceWorker
<
MemoryPoolMetric
>
{
@Override
public
int
id
()
{
return
WorkerIdDefine
.
MEMORY_POOL_METRIC_PERSISTENCE_WORKER_ID
;
return
WorkerIdDefine
.
MEMORY_POOL_
SECOND_
METRIC_PERSISTENCE_WORKER_ID
;
}
public
MemoryPoolMetricPersistenceWorker
(
ModuleManager
moduleManager
)
{
public
MemoryPool
Second
MetricPersistenceWorker
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
...
...
@@ -46,17 +46,17 @@ public class MemoryPoolMetricPersistenceWorker extends PersistenceWorker<MemoryP
@SuppressWarnings
(
"unchecked"
)
@Override
protected
IPersistenceDAO
<?,
?,
MemoryPoolMetric
>
persistenceDAO
()
{
return
getModuleManager
().
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPoolMetricPersistenceDAO
.
class
);
return
getModuleManager
().
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPool
Second
MetricPersistenceDAO
.
class
);
}
public
static
class
Factory
extends
PersistenceWorkerProvider
<
MemoryPoolMetric
,
MemoryPoolMetricPersistenceWorker
>
{
public
static
class
Factory
extends
PersistenceWorkerProvider
<
MemoryPoolMetric
,
MemoryPool
Second
MetricPersistenceWorker
>
{
public
Factory
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
public
MemoryPoolMetricPersistenceWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
MemoryPoolMetricPersistenceWorker
(
moduleManager
);
@Override
public
MemoryPool
Second
MetricPersistenceWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
MemoryPool
Second
MetricPersistenceWorker
(
moduleManager
);
}
@Override
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
浏览文件 @
63e9c54f
...
...
@@ -55,7 +55,7 @@ import org.apache.skywalking.apm.collector.storage.dao.IInstanceRegisterDAO;
import
org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemorySecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
IMemoryPool
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
mpoolmp.IMemoryPoolSecond
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IMemoryPoolMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.INetworkAddressCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.INetworkAddressRegisterDAO
;
...
...
@@ -117,7 +117,7 @@ public class StorageModule extends Module {
classes
.
add
(
ICpuSecondMetricPersistenceDAO
.
class
);
classes
.
add
(
IGCSecondMetricPersistenceDAO
.
class
);
classes
.
add
(
IMemorySecondMetricPersistenceDAO
.
class
);
classes
.
add
(
IMemoryPoolMetricPersistenceDAO
.
class
);
classes
.
add
(
IMemoryPool
Second
MetricPersistenceDAO
.
class
);
classes
.
add
(
IGlobalTracePersistenceDAO
.
class
);
classes
.
add
(
IApplicationComponentMinutePersistenceDAO
.
class
);
...
...
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/
IMemoryPool
MetricPersistenceDAO.java
→
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/
mpoolmp/IMemoryPoolDay
MetricPersistenceDAO.java
浏览文件 @
63e9c54f
...
...
@@ -16,7 +16,7 @@
*
*/
package
org.apache.skywalking.apm.collector.storage.dao
;
package
org.apache.skywalking.apm.collector.storage.dao
.mpoolmp
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
...
...
@@ -24,5 +24,5 @@ import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric;
/**
* @author peng-yongsheng
*/
public
interface
IMemoryPool
MetricPersistenceDAO
<
Insert
,
Update
,
DataImpl
extends
MemoryPoolMetric
>
extends
IPersistenceDAO
<
Insert
,
Update
,
DataImpl
>
{
public
interface
IMemoryPool
DayMetricPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
extends
MemoryPoolMetric
>
extends
IPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
>
{
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolHourMetricPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
interface
IMemoryPoolHourMetricPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
extends
MemoryPoolMetric
>
extends
IPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
>
{
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolMinuteMetricPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
interface
IMemoryPoolMinuteMetricPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
extends
MemoryPoolMetric
>
extends
IPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
>
{
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolMonthMetricPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
interface
IMemoryPoolMonthMetricPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
extends
MemoryPoolMetric
>
extends
IPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
>
{
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/dao/mpoolmp/IMemoryPoolSecondMetricPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
/**
* @author peng-yongsheng
*/
public
interface
IMemoryPoolSecondMetricPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
extends
MemoryPoolMetric
>
extends
IPersistenceDAO
<
INSERT
,
UPDATE
,
STREAM_DATA
>
{
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/table/jvm/MemoryPoolMetric.java
浏览文件 @
63e9c54f
...
...
@@ -16,21 +16,21 @@
*
*/
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.
Abstract
Data
;
import
org.apache.skywalking.apm.collector.core.data.
Stream
Data
;
import
org.apache.skywalking.apm.collector.core.data.operator.CoverOperation
;
import
org.apache.skywalking.apm.collector.core.data.operator.NonOperation
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMetric
extends
Abstract
Data
{
public
class
MemoryPoolMetric
extends
Stream
Data
{
private
static
final
Column
[]
STRING_COLUMNS
=
{
new
Column
(
MemoryPoolMetricTable
.
COLUMN_ID
,
new
NonOperation
()),
new
Column
(
MemoryPoolMetricTable
.
COLUMN_METRIC_ID
,
new
NonOperation
()),
};
private
static
final
Column
[]
LONG_COLUMNS
=
{
...
...
@@ -50,10 +50,27 @@ public class MemoryPoolMetric extends AbstractData {
};
private
static
final
Column
[]
BOOLEAN_COLUMNS
=
{};
private
static
final
Column
[]
BYTE_COLUMNS
=
{};
public
MemoryPoolMetric
(
String
id
)
{
super
(
id
,
STRING_COLUMNS
,
LONG_COLUMNS
,
DOUBLE_COLUMNS
,
INTEGER_COLUMNS
,
BOOLEAN_COLUMNS
,
BYTE_COLUMNS
);
public
MemoryPoolMetric
()
{
super
(
STRING_COLUMNS
,
LONG_COLUMNS
,
DOUBLE_COLUMNS
,
INTEGER_COLUMNS
,
BOOLEAN_COLUMNS
,
BYTE_COLUMNS
);
}
@Override
public
String
getId
()
{
return
getDataString
(
0
);
}
@Override
public
void
setId
(
String
id
)
{
setDataString
(
0
,
id
);
}
@Override
public
String
getMetricId
()
{
return
getDataString
(
1
);
}
@Override
public
void
setMetricId
(
String
metricId
)
{
setDataString
(
1
,
metricId
);
}
public
Long
getInit
()
{
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/DataTTLKeeperTimer.java
浏览文件 @
63e9c54f
...
...
@@ -33,6 +33,7 @@ import org.apache.skywalking.apm.collector.storage.dao.cpump.ICpuSecondMetricPer
import
org.apache.skywalking.apm.collector.storage.dao.gcmp.IGCSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.imp.IInstanceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemorySecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.mpoolmp.IMemoryPoolSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO
;
/**
...
...
@@ -86,7 +87,7 @@ public class DataTTLKeeperTimer {
IMemorySecondMetricPersistenceDAO
memoryMetricPersistenceDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IMemorySecondMetricPersistenceDAO
.
class
);
memoryMetricPersistenceDAO
.
deleteHistory
(
startTimestamp
,
endTimestamp
);
IMemoryPool
MetricPersistenceDAO
memoryPoolMetricPersistenceDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPool
MetricPersistenceDAO
.
class
);
IMemoryPool
SecondMetricPersistenceDAO
memoryPoolMetricPersistenceDAO
=
moduleManager
.
find
(
StorageModule
.
NAME
).
getService
(
IMemoryPoolSecond
MetricPersistenceDAO
.
class
);
memoryPoolMetricPersistenceDAO
.
deleteHistory
(
startTimestamp
,
endTimestamp
);
}
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/StorageModuleEsProvider.java
浏览文件 @
63e9c54f
...
...
@@ -64,7 +64,7 @@ import org.apache.skywalking.apm.collector.storage.dao.IInstanceRegisterDAO;
import
org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemorySecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
IMemoryPool
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
mpoolmp.IMemoryPoolSecond
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IMemoryPoolMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.INetworkAddressCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.INetworkAddressRegisterDAO
;
...
...
@@ -118,7 +118,7 @@ import org.apache.skywalking.apm.collector.storage.es.dao.InstanceReferenceAlarm
import
org.apache.skywalking.apm.collector.storage.es.dao.irmp.InstanceReferenceMinuteMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.memorymp.MemorySecondMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.MemoryMetricEsUIDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.
MemoryPool
MetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.
mpoolmp.MemoryPoolSecond
MetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.MemoryPoolMetricEsUIDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.NetworkAddressEsCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.NetworkAddressRegisterEsDAO
;
...
...
@@ -230,7 +230,7 @@ public class StorageModuleEsProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
ICpuSecondMetricPersistenceDAO
.
class
,
new
CpuSecondMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IGCSecondMetricPersistenceDAO
.
class
,
new
GCSecondMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IMemorySecondMetricPersistenceDAO
.
class
,
new
MemorySecondMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IMemoryPool
MetricPersistenceDAO
.
class
,
new
MemoryPool
MetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IMemoryPool
SecondMetricPersistenceDAO
.
class
,
new
MemoryPoolSecond
MetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IGlobalTracePersistenceDAO
.
class
,
new
GlobalTraceEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IApplicationComponentMinutePersistenceDAO
.
class
,
new
ApplicationComponentMinuteEsPersistenceDAO
(
elasticSearchClient
));
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/MemoryPoolMetricEsPersistenceDAO.java
已删除
100644 → 0
浏览文件 @
2428e8a8
/*
* 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.dao
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
import
org.apache.skywalking.apm.collector.core.util.TimeBucketUtils
;
import
org.apache.skywalking.apm.collector.storage.dao.IMemoryPoolMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.base.dao.EsDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable
;
import
org.elasticsearch.action.index.IndexRequestBuilder
;
import
org.elasticsearch.action.update.UpdateRequestBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.index.reindex.BulkByScrollResponse
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMetricEsPersistenceDAO
extends
EsDAO
implements
IMemoryPoolMetricPersistenceDAO
<
IndexRequestBuilder
,
UpdateRequestBuilder
,
MemoryPoolMetric
>
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MemoryPoolMetricEsPersistenceDAO
.
class
);
public
MemoryPoolMetricEsPersistenceDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
public
MemoryPoolMetric
get
(
String
id
)
{
return
null
;
}
@Override
public
IndexRequestBuilder
prepareBatchInsert
(
MemoryPoolMetric
data
)
{
Map
<
String
,
Object
>
source
=
new
HashMap
<>();
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_INSTANCE_ID
,
data
.
getInstanceId
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_POOL_TYPE
,
data
.
getPoolType
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_INIT
,
data
.
getInit
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_MAX
,
data
.
getMax
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_USED
,
data
.
getUsed
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_COMMITTED
,
data
.
getCommitted
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_TIME_BUCKET
,
data
.
getTimeBucket
());
return
getClient
().
prepareIndex
(
MemoryPoolMetricTable
.
TABLE
,
data
.
getId
()).
setSource
(
source
);
}
@Override
public
UpdateRequestBuilder
prepareBatchUpdate
(
MemoryPoolMetric
data
)
{
return
null
;
}
@Override
public
void
deleteHistory
(
Long
startTimestamp
,
Long
endTimestamp
)
{
long
startTimeBucket
=
TimeBucketUtils
.
INSTANCE
.
getSecondTimeBucket
(
startTimestamp
);
long
endTimeBucket
=
TimeBucketUtils
.
INSTANCE
.
getSecondTimeBucket
(
endTimestamp
);
BulkByScrollResponse
response
=
getClient
().
prepareDelete
()
.
filter
(
QueryBuilders
.
rangeQuery
(
MemoryPoolMetricTable
.
COLUMN_TIME_BUCKET
).
gte
(
startTimeBucket
).
lte
(
endTimeBucket
))
.
source
(
MemoryPoolMetricTable
.
TABLE
)
.
get
();
long
deleted
=
response
.
getDeleted
();
logger
.
info
(
"Delete {} rows history from {} index."
,
deleted
,
MemoryPoolMetricTable
.
TABLE
);
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/AbstractMemoryPoolMetricEsPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
import
org.apache.skywalking.apm.collector.storage.es.base.dao.AbstractPersistenceEsDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable
;
/**
* @author peng-yongsheng
*/
public
abstract
class
AbstractMemoryPoolMetricEsPersistenceDAO
extends
AbstractPersistenceEsDAO
<
MemoryPoolMetric
>
{
AbstractMemoryPoolMetricEsPersistenceDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
protected
final
String
timeBucketColumnNameForDelete
()
{
return
MemoryPoolMetricTable
.
COLUMN_TIME_BUCKET
;
}
@Override
protected
final
MemoryPoolMetric
esDataToStreamData
(
Map
<
String
,
Object
>
source
)
{
return
null
;
}
@Override
protected
final
Map
<
String
,
Object
>
esStreamDataToEsData
(
MemoryPoolMetric
streamData
)
{
Map
<
String
,
Object
>
source
=
new
HashMap
<>();
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_ID
,
streamData
.
getId
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_METRIC_ID
,
streamData
.
getMetricId
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_INSTANCE_ID
,
streamData
.
getInstanceId
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_POOL_TYPE
,
streamData
.
getPoolType
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_INIT
,
streamData
.
getInit
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_MAX
,
streamData
.
getMax
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_USED
,
streamData
.
getUsed
());
source
.
put
(
MemoryPoolMetricTable
.
COLUMN_COMMITTED
,
streamData
.
getCommitted
());
source
.
put
(
MemoryPoolMetricTable
.
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/dao/mpoolmp/MemoryPoolDayMetricEsPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
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.dao.mpoolmp.IMemoryPoolDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable
;
import
org.elasticsearch.action.index.IndexRequestBuilder
;
import
org.elasticsearch.action.update.UpdateRequestBuilder
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolDayMetricEsPersistenceDAO
extends
AbstractMemoryPoolMetricEsPersistenceDAO
implements
IMemoryPoolDayMetricPersistenceDAO
<
IndexRequestBuilder
,
UpdateRequestBuilder
,
MemoryPoolMetric
>
{
public
MemoryPoolDayMetricEsPersistenceDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
MemoryPoolMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Day
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolHourMetricEsPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
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.dao.mpoolmp.IMemoryPoolHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable
;
import
org.elasticsearch.action.index.IndexRequestBuilder
;
import
org.elasticsearch.action.update.UpdateRequestBuilder
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolHourMetricEsPersistenceDAO
extends
AbstractMemoryPoolMetricEsPersistenceDAO
implements
IMemoryPoolHourMetricPersistenceDAO
<
IndexRequestBuilder
,
UpdateRequestBuilder
,
MemoryPoolMetric
>
{
public
MemoryPoolHourMetricEsPersistenceDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
MemoryPoolMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Hour
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolMinuteMetricEsPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
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.dao.mpoolmp.IMemoryPoolMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable
;
import
org.elasticsearch.action.index.IndexRequestBuilder
;
import
org.elasticsearch.action.update.UpdateRequestBuilder
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMinuteMetricEsPersistenceDAO
extends
AbstractMemoryPoolMetricEsPersistenceDAO
implements
IMemoryPoolMinuteMetricPersistenceDAO
<
IndexRequestBuilder
,
UpdateRequestBuilder
,
MemoryPoolMetric
>
{
public
MemoryPoolMinuteMetricEsPersistenceDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
MemoryPoolMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Minute
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolMonthMetricEsPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
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.dao.mpoolmp.IMemoryPoolMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable
;
import
org.elasticsearch.action.index.IndexRequestBuilder
;
import
org.elasticsearch.action.update.UpdateRequestBuilder
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolMonthMetricEsPersistenceDAO
extends
AbstractMemoryPoolMetricEsPersistenceDAO
implements
IMemoryPoolMonthMetricPersistenceDAO
<
IndexRequestBuilder
,
UpdateRequestBuilder
,
MemoryPoolMetric
>
{
public
MemoryPoolMonthMetricEsPersistenceDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
MemoryPoolMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Month
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/mpoolmp/MemoryPoolSecondMetricEsPersistenceDAO.java
0 → 100644
浏览文件 @
63e9c54f
/*
* 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.dao.mpoolmp
;
import
org.apache.skywalking.apm.collector.client.elasticsearch.ElasticSearchClient
;
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.dao.mpoolmp.IMemoryPoolSecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTable
;
import
org.elasticsearch.action.index.IndexRequestBuilder
;
import
org.elasticsearch.action.update.UpdateRequestBuilder
;
/**
* @author peng-yongsheng
*/
public
class
MemoryPoolSecondMetricEsPersistenceDAO
extends
AbstractMemoryPoolMetricEsPersistenceDAO
implements
IMemoryPoolSecondMetricPersistenceDAO
<
IndexRequestBuilder
,
UpdateRequestBuilder
,
MemoryPoolMetric
>
{
public
MemoryPoolSecondMetricEsPersistenceDAO
(
ElasticSearchClient
client
)
{
super
(
client
);
}
@Override
protected
String
tableName
()
{
return
MemoryPoolMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Second
.
getName
();
}
}
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/StorageModuleH2Provider.java
浏览文件 @
63e9c54f
...
...
@@ -60,7 +60,7 @@ import org.apache.skywalking.apm.collector.storage.dao.IInstanceRegisterDAO;
import
org.apache.skywalking.apm.collector.storage.dao.IInstanceUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.memorymp.IMemorySecondMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
IMemoryPool
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
mpoolmp.IMemoryPoolSecond
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IMemoryPoolMetricUIDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.INetworkAddressCacheDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.INetworkAddressRegisterDAO
;
...
...
@@ -114,7 +114,7 @@ import org.apache.skywalking.apm.collector.storage.h2.dao.InstanceReferenceAlarm
import
org.apache.skywalking.apm.collector.storage.h2.dao.InstanceReferenceMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.MemorySecondMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.MemoryMetricH2UIDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.MemoryPoolMetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.MemoryPool
Second
MetricH2PersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.MemoryPoolMetricH2UIDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.NetworkAddressH2CacheDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.dao.NetworkAddressRegisterH2DAO
;
...
...
@@ -208,7 +208,7 @@ public class StorageModuleH2Provider extends ModuleProvider {
this
.
registerServiceImplementation
(
ICpuSecondMetricPersistenceDAO
.
class
,
new
CpuSecondMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IGCSecondMetricPersistenceDAO
.
class
,
new
GCSecondMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IMemorySecondMetricPersistenceDAO
.
class
,
new
MemorySecondMetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IMemoryPool
MetricPersistenceDAO
.
class
,
new
MemoryPool
MetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IMemoryPool
SecondMetricPersistenceDAO
.
class
,
new
MemoryPoolSecond
MetricH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IGlobalTracePersistenceDAO
.
class
,
new
GlobalTraceH2PersistenceDAO
(
h2Client
));
this
.
registerServiceImplementation
(
IApplicationComponentMinutePersistenceDAO
.
class
,
new
ApplicationComponentH2MinutePersistenceDAO
(
h2Client
));
...
...
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/MemoryPoolMetricH2PersistenceDAO.java
→
apm-collector/apm-collector-storage/collector-storage-h2-provider/src/main/java/org/apache/skywalking/apm/collector/storage/h2/dao/MemoryPool
Second
MetricH2PersistenceDAO.java
浏览文件 @
63e9c54f
...
...
@@ -23,7 +23,7 @@ import java.util.HashMap;
import
java.util.Map
;
import
org.apache.skywalking.apm.collector.client.h2.H2Client
;
import
org.apache.skywalking.apm.collector.storage.base.sql.SqlBuilder
;
import
org.apache.skywalking.apm.collector.storage.dao.
IMemoryPool
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.
mpoolmp.IMemoryPoolSecond
MetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.dao.H2DAO
;
import
org.apache.skywalking.apm.collector.storage.h2.base.define.H2SqlEntity
;
import
org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetric
;
...
...
@@ -32,9 +32,9 @@ import org.apache.skywalking.apm.collector.storage.table.jvm.MemoryPoolMetricTab
/**
* @author peng-yongsheng, clevertension
*/
public
class
MemoryPool
MetricH2PersistenceDAO
extends
H2DAO
implements
IMemoryPool
MetricPersistenceDAO
<
H2SqlEntity
,
H2SqlEntity
,
MemoryPoolMetric
>
{
public
class
MemoryPool
SecondMetricH2PersistenceDAO
extends
H2DAO
implements
IMemoryPoolSecond
MetricPersistenceDAO
<
H2SqlEntity
,
H2SqlEntity
,
MemoryPoolMetric
>
{
public
MemoryPoolMetricH2PersistenceDAO
(
H2Client
client
)
{
public
MemoryPool
Second
MetricH2PersistenceDAO
(
H2Client
client
)
{
super
(
client
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录