Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
润土的好友猹
SkyWalking
提交
ef787fa5
S
SkyWalking
项目概览
润土的好友猹
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
9
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,发现更多精彩内容 >>
提交
ef787fa5
编写于
10月 25, 2018
作者:
林
林嘉琦 Lin Jiaqi
提交者:
wu-sheng
10月 25, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the issue #1529 (#1812)
上级
6a0ae6b8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
130 addition
and
59 deletion
+130
-59
apm-collector/apm-collector-storage/collector-storage-shardingjdbc-provider/src/main/java/org/apache/skywalking/apm/collector/storage/shardingjdbc/StorageModuleShardingjdbcConfig.java
...storage/shardingjdbc/StorageModuleShardingjdbcConfig.java
+47
-1
apm-collector/apm-collector-storage/collector-storage-shardingjdbc-provider/src/main/java/org/apache/skywalking/apm/collector/storage/shardingjdbc/StorageModuleShardingjdbcProvider.java
...orage/shardingjdbc/StorageModuleShardingjdbcProvider.java
+29
-58
apm-collector/apm-collector-storage/collector-storage-shardingjdbc-provider/src/main/java/org/apache/skywalking/apm/collector/storage/shardingjdbc/ttl/TTLConfigService.java
.../collector/storage/shardingjdbc/ttl/TTLConfigService.java
+54
-0
未找到文件。
apm-collector/apm-collector-storage/collector-storage-shardingjdbc-provider/src/main/java/org/apache/skywalking/apm/collector/storage/shardingjdbc/StorageModuleShardingjdbcConfig.java
浏览文件 @
ef787fa5
...
...
@@ -23,5 +23,51 @@ import org.apache.skywalking.apm.collector.client.shardingjdbc.ShardingjdbcClien
/**
* @author linjiaqi
*/
class
StorageModuleShardingjdbcConfig
extends
ShardingjdbcClientConfig
{
public
class
StorageModuleShardingjdbcConfig
extends
ShardingjdbcClientConfig
{
private
int
traceDataTTL
=
90
;
private
int
minuteMetricDataTTL
=
90
;
private
int
hourMetricDataTTL
=
36
;
private
int
dayMetricDataTTL
=
45
;
private
int
monthMetricDataTTL
=
18
;
public
int
getTraceDataTTL
()
{
return
traceDataTTL
;
}
void
setTraceDataTTL
(
int
traceDataTTL
)
{
this
.
traceDataTTL
=
traceDataTTL
==
0
?
90
:
traceDataTTL
;
}
public
int
getMinuteMetricDataTTL
()
{
return
minuteMetricDataTTL
;
}
void
setMinuteMetricDataTTL
(
int
minuteMetricDataTTL
)
{
this
.
minuteMetricDataTTL
=
minuteMetricDataTTL
==
0
?
90
:
minuteMetricDataTTL
;
}
public
int
getHourMetricDataTTL
()
{
return
hourMetricDataTTL
;
}
void
setHourMetricDataTTL
(
int
hourMetricDataTTL
)
{
this
.
hourMetricDataTTL
=
hourMetricDataTTL
==
0
?
36
:
hourMetricDataTTL
;
}
public
int
getDayMetricDataTTL
()
{
return
dayMetricDataTTL
;
}
void
setDayMetricDataTTL
(
int
dayMetricDataTTL
)
{
this
.
dayMetricDataTTL
=
dayMetricDataTTL
==
0
?
45
:
dayMetricDataTTL
;
}
public
int
getMonthMetricDataTTL
()
{
return
monthMetricDataTTL
;
}
void
setMonthMetricDataTTL
(
int
monthMetricDataTTL
)
{
this
.
monthMetricDataTTL
=
monthMetricDataTTL
==
0
?
18
:
monthMetricDataTTL
;
}
}
apm-collector/apm-collector-storage/collector-storage-shardingjdbc-provider/src/main/java/org/apache/skywalking/apm/collector/storage/shardingjdbc/StorageModuleShardingjdbcProvider.java
浏览文件 @
ef787fa5
...
...
@@ -33,29 +33,12 @@ import org.apache.skywalking.apm.collector.remote.RemoteModule;
import
org.apache.skywalking.apm.collector.storage.StorageException
;
import
org.apache.skywalking.apm.collector.storage.StorageModule
;
import
org.apache.skywalking.apm.collector.storage.base.dao.IBatchDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.IInstanceHeartBeatPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ISegmentDurationPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.ISegmentPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.*
;
import
org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentDayPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentHourPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMinutePersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.acp.IApplicationComponentMonthPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListDayPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListHourPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListMinutePersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmListMonthPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationAlarmPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmListPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IApplicationReferenceAlarmPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmListPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceAlarmPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmListPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IInstanceReferenceAlarmPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmListPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceAlarmPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmListPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.IServiceReferenceAlarmPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.alarm.*
;
import
org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.amp.IApplicationMinuteMetricPersistenceDAO
;
...
...
@@ -119,29 +102,12 @@ import org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMon
import
org.apache.skywalking.apm.collector.storage.dao.ui.*
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.base.dao.BatchShardingjdbcDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.base.define.ShardingjdbcStorageInstaller
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.GlobalTraceShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.InstanceHeartBeatShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.SegmentDurationShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.SegmentShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.*
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.acp.ApplicationComponentDayShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.acp.ApplicationComponentHourShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.acp.ApplicationComponentMinuteShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.acp.ApplicationComponentMonthShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ApplicationAlarmListShardingjdbcDayPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ApplicationAlarmListShardingjdbcHourPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ApplicationAlarmListShardingjdbcMinutePersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ApplicationAlarmListShardingjdbcMonthPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ApplicationAlarmShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ApplicationReferenceAlarmListShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ApplicationReferenceAlarmShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.InstanceAlarmListShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.InstanceAlarmShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.InstanceReferenceAlarmListShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.InstanceReferenceAlarmShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ServiceAlarmListShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ServiceAlarmShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ServiceReferenceAlarmListShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.ServiceReferenceAlarmShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.alarm.*
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.amp.ApplicationDayMetricShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.amp.ApplicationHourMetricShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.amp.ApplicationMinuteMetricShardingjdbcPersistenceDAO
;
...
...
@@ -204,6 +170,8 @@ import org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.srmp.Service
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.srmp.ServiceReferenceMonthMetricShardingjdbcPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.dao.ui.*
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.strategy.ShardingjdbcStrategy
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.ttl.TTLConfigService
;
import
org.apache.skywalking.apm.collector.storage.ttl.ITTLConfigService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -245,6 +213,7 @@ public class StorageModuleShardingjdbcProvider extends ModuleProvider {
ShardingRuleConfiguration
shardingRuleConfig
=
createShardingRule
(
shardingjdbcClientConfigs
.
size
());
shardingjdbcClient
=
new
ShardingjdbcClient
(
shardingjdbcClientConfigs
,
shardingRuleConfig
);
this
.
registerServiceImplementation
(
ITTLConfigService
.
class
,
new
TTLConfigService
(
config
));
this
.
registerServiceImplementation
(
IBatchDAO
.
class
,
new
BatchShardingjdbcDAO
(
shardingjdbcClient
));
registerCacheDAO
();
registerRegisterDAO
();
...
...
@@ -333,17 +302,6 @@ public class StorageModuleShardingjdbcProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
IMemoryPoolDayMetricPersistenceDAO
.
class
,
new
MemoryPoolDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IMemoryPoolMonthMetricPersistenceDAO
.
class
,
new
MemoryPoolMonthMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IGlobalTracePersistenceDAO
.
class
,
new
GlobalTraceShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionMinutePersistenceDAO
.
class
,
new
ResponseTimeDistributionMinuteShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionHourPersistenceDAO
.
class
,
new
ResponseTimeDistributionHourShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionDayPersistenceDAO
.
class
,
new
ResponseTimeDistributionDayShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionMonthPersistenceDAO
.
class
,
new
ResponseTimeDistributionMonthShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
ISegmentDurationPersistenceDAO
.
class
,
new
SegmentDurationShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
ISegmentPersistenceDAO
.
class
,
new
SegmentShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceHeartBeatPersistenceDAO
.
class
,
new
InstanceHeartBeatShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IApplicationComponentMinutePersistenceDAO
.
class
,
new
ApplicationComponentMinuteShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IApplicationComponentHourPersistenceDAO
.
class
,
new
ApplicationComponentHourShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IApplicationComponentDayPersistenceDAO
.
class
,
new
ApplicationComponentDayShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
...
...
@@ -359,6 +317,13 @@ public class StorageModuleShardingjdbcProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
IInstanceMappingDayPersistenceDAO
.
class
,
new
InstanceMappingDayShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceMappingMonthPersistenceDAO
.
class
,
new
InstanceMappingMonthShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IGlobalTracePersistenceDAO
.
class
,
new
GlobalTraceShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionMinutePersistenceDAO
.
class
,
new
ResponseTimeDistributionMinuteShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionHourPersistenceDAO
.
class
,
new
ResponseTimeDistributionHourShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionDayPersistenceDAO
.
class
,
new
ResponseTimeDistributionDayShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IResponseTimeDistributionMonthPersistenceDAO
.
class
,
new
ResponseTimeDistributionMonthShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IApplicationMinuteMetricPersistenceDAO
.
class
,
new
ApplicationMinuteMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IApplicationHourMetricPersistenceDAO
.
class
,
new
ApplicationHourMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IApplicationDayMetricPersistenceDAO
.
class
,
new
ApplicationDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
...
...
@@ -369,15 +334,8 @@ public class StorageModuleShardingjdbcProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
IApplicationReferenceDayMetricPersistenceDAO
.
class
,
new
ApplicationReferenceDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IApplicationReferenceMonthMetricPersistenceDAO
.
class
,
new
ApplicationReferenceMonthMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceMinuteMetricPersistenceDAO
.
class
,
new
InstanceMinuteMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceHourMetricPersistenceDAO
.
class
,
new
InstanceHourMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceDayMetricPersistenceDAO
.
class
,
new
InstanceDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceMonthMetricPersistenceDAO
.
class
,
new
InstanceMonthMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceMinuteMetricPersistenceDAO
.
class
,
new
InstanceReferenceMinuteMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceHourMetricPersistenceDAO
.
class
,
new
InstanceReferenceHourMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceDayMetricPersistenceDAO
.
class
,
new
InstanceReferenceDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceMonthMetricPersistenceDAO
.
class
,
new
InstanceReferenceMonthMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
ISegmentDurationPersistenceDAO
.
class
,
new
SegmentDurationShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
ISegmentPersistenceDAO
.
class
,
new
SegmentShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IServiceMinuteMetricPersistenceDAO
.
class
,
new
ServiceMinuteMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IServiceHourMetricPersistenceDAO
.
class
,
new
ServiceHourMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
...
...
@@ -388,6 +346,19 @@ public class StorageModuleShardingjdbcProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
IServiceReferenceHourMetricPersistenceDAO
.
class
,
new
ServiceReferenceHourMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IServiceReferenceDayMetricPersistenceDAO
.
class
,
new
ServiceReferenceDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IServiceReferenceMonthMetricPersistenceDAO
.
class
,
new
ServiceReferenceMonthMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceMinuteMetricPersistenceDAO
.
class
,
new
InstanceMinuteMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceHourMetricPersistenceDAO
.
class
,
new
InstanceHourMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceDayMetricPersistenceDAO
.
class
,
new
InstanceDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceMonthMetricPersistenceDAO
.
class
,
new
InstanceMonthMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceMinuteMetricPersistenceDAO
.
class
,
new
InstanceReferenceMinuteMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceHourMetricPersistenceDAO
.
class
,
new
InstanceReferenceHourMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceDayMetricPersistenceDAO
.
class
,
new
InstanceReferenceDayMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceMonthMetricPersistenceDAO
.
class
,
new
InstanceReferenceMonthMetricShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IInstanceHeartBeatPersistenceDAO
.
class
,
new
InstanceHeartBeatShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
this
.
registerServiceImplementation
(
IServiceNameHeartBeatPersistenceDAO
.
class
,
new
ServiceNameHeartBeatShardingjdbcPersistenceDAO
(
shardingjdbcClient
));
}
private
void
registerUiDAO
()
throws
ServiceNotProvidedException
{
...
...
apm-collector/apm-collector-storage/collector-storage-shardingjdbc-provider/src/main/java/org/apache/skywalking/apm/collector/storage/shardingjdbc/ttl/TTLConfigService.java
0 → 100644
浏览文件 @
ef787fa5
/*
* 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.shardingjdbc.ttl
;
import
org.apache.skywalking.apm.collector.storage.shardingjdbc.StorageModuleShardingjdbcConfig
;
import
org.apache.skywalking.apm.collector.storage.ttl.ITTLConfigService
;
/**
* @author linjiaqi
*/
public
class
TTLConfigService
implements
ITTLConfigService
{
private
StorageModuleShardingjdbcConfig
config
;
public
TTLConfigService
(
StorageModuleShardingjdbcConfig
config
)
{
this
.
config
=
config
;
}
@Override
public
int
traceDataTTL
()
{
return
config
.
getTraceDataTTL
();
}
@Override
public
int
minuteMetricDataTTL
()
{
return
config
.
getMinuteMetricDataTTL
();
}
@Override
public
int
hourMetricDataTTL
()
{
return
config
.
getHourMetricDataTTL
();
}
@Override
public
int
dayMetricDataTTL
()
{
return
config
.
getDayMetricDataTTL
();
}
@Override
public
int
monthMetricDataTTL
()
{
return
config
.
getMonthMetricDataTTL
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录