Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
0eb26f1d
S
SkyWalking
项目概览
apache
/
SkyWalking
上一次同步 1 年多
通知
302
Star
21345
Fork
6091
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
0eb26f1d
编写于
1月 08, 2018
作者:
P
peng-yongsheng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Service reference metric pyramid aggregate test successful.
上级
92bdb739
变更
33
隐藏空白更改
内联
并排
Showing
33 changed file
with
404 addition
and
89 deletion
+404
-89
apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/service/ServiceMetricAlarmGraph.java
...larm/provider/worker/service/ServiceMetricAlarmGraph.java
+1
-1
apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/service/ServiceReferenceMetricAlarmGraph.java
...ider/worker/service/ServiceReferenceMetricAlarmGraph.java
+1
-1
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/AnalysisMetricModuleProvider.java
...nalysis/metric/provider/AnalysisMetricModuleProvider.java
+2
-1
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentCopy.java
...orker/application/component/ApplicationComponentCopy.java
+38
-0
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentDayTransformNode.java
...ation/component/ApplicationComponentDayTransformNode.java
+1
-5
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentHourTransformNode.java
...tion/component/ApplicationComponentHourTransformNode.java
+1
-5
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentMonthTransformNode.java
...ion/component/ApplicationComponentMonthTransformNode.java
+1
-5
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingCopy.java
...er/worker/application/mapping/ApplicationMappingCopy.java
+38
-0
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingDayTransformNode.java
...plication/mapping/ApplicationMappingDayTransformNode.java
+1
-6
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingHourTransformNode.java
...lication/mapping/ApplicationMappingHourTransformNode.java
+1
-5
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingMonthTransformNode.java
...ication/mapping/ApplicationMappingMonthTransformNode.java
+1
-6
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingCopy.java
...provider/worker/instance/mapping/InstanceMappingCopy.java
+39
-0
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingDayTransformNode.java
...ker/instance/mapping/InstanceMappingDayTransformNode.java
+1
-7
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingHourTransformNode.java
...er/instance/mapping/InstanceMappingHourTransformNode.java
+1
-7
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingMonthTransformNode.java
...r/instance/mapping/InstanceMappingMonthTransformNode.java
+1
-7
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/refmetric/InstanceReferenceMetricGraph.java
...rker/instance/refmetric/InstanceReferenceMetricGraph.java
+1
-1
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/metric/ServiceMetricGraph.java
...ic/provider/worker/service/metric/ServiceMetricGraph.java
+1
-1
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceDayMetricTransformNode.java
...ice/refmetric/ServiceReferenceDayMetricTransformNode.java
+5
-3
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceHourMetricTransformNode.java
...ce/refmetric/ServiceReferenceHourMetricTransformNode.java
+5
-3
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricCopy.java
.../worker/service/refmetric/ServiceReferenceMetricCopy.java
+59
-0
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricGraph.java
...worker/service/refmetric/ServiceReferenceMetricGraph.java
+2
-2
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricSpanListener.java
...service/refmetric/ServiceReferenceMetricSpanListener.java
+6
-2
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMinuteMetricAggregationWorker.java
...metric/ServiceReferenceMinuteMetricAggregationWorker.java
+5
-5
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMinuteMetricRemoteWorker.java
...e/refmetric/ServiceReferenceMinuteMetricRemoteWorker.java
+5
-5
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMonthMetricTransformNode.java
...e/refmetric/ServiceReferenceMonthMetricTransformNode.java
+5
-3
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
...pache/skywalking/apm/collector/storage/StorageModule.java
+11
-0
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
+12
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/AbstractServiceReferenceMetricEsTableDefine.java
...ine/srmp/AbstractServiceReferenceMetricEsTableDefine.java
+6
-8
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceDayMetricEsTableDefine.java
...s/define/srmp/ServiceReferenceDayMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceHourMetricEsTableDefine.java
.../define/srmp/ServiceReferenceHourMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceMinuteMetricEsTableDefine.java
...efine/srmp/ServiceReferenceMinuteMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceMonthMetricEsTableDefine.java
...define/srmp/ServiceReferenceMonthMetricEsTableDefine.java
+37
-0
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define
...ovider/src/main/resources/META-INF/defines/storage.define
+5
-0
未找到文件。
apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/service/ServiceMetricAlarmGraph.java
浏览文件 @
0eb26f1d
...
...
@@ -59,7 +59,7 @@ public class ServiceMetricAlarmGraph {
.
addNext
(
new
ServiceMetricAlarmToListNodeProcessor
())
.
addNext
(
new
ServiceMetricAlarmListPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
link
(
graph
);
//
link(graph);
}
private
void
link
(
Graph
<
ServiceMetric
>
graph
)
{
...
...
apm-collector/apm-collector-analysis/analysis-alarm/alarm-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/alarm/provider/worker/service/ServiceReferenceMetricAlarmGraph.java
浏览文件 @
0eb26f1d
...
...
@@ -59,7 +59,7 @@ public class ServiceReferenceMetricAlarmGraph {
.
addNext
(
new
ServiceReferenceMetricAlarmToListNodeProcessor
())
.
addNext
(
new
ServiceReferenceMetricAlarmListPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
link
(
graph
);
//
link(graph);
}
private
void
link
(
Graph
<
ServiceReferenceMetric
>
graph
)
{
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/AnalysisMetricModuleProvider.java
浏览文件 @
0eb26f1d
...
...
@@ -36,6 +36,7 @@ import org.apache.skywalking.apm.collector.analysis.metric.provider.worker.segme
import
org.apache.skywalking.apm.collector.analysis.metric.provider.worker.segment.SegmentCostSpanListener
;
import
org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.metric.ServiceMetricGraph
;
import
org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.refmetric.ServiceReferenceMetricGraph
;
import
org.apache.skywalking.apm.collector.analysis.metric.provider.worker.service.refmetric.ServiceReferenceMetricSpanListener
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.AnalysisSegmentParserModule
;
import
org.apache.skywalking.apm.collector.analysis.segment.parser.define.service.ISegmentParserListenerRegister
;
import
org.apache.skywalking.apm.collector.analysis.worker.model.base.WorkerCreateListener
;
...
...
@@ -83,7 +84,7 @@ public class AnalysisMetricModuleProvider extends ModuleProvider {
private
void
segmentParserListenerRegister
()
{
ISegmentParserListenerRegister
segmentParserListenerRegister
=
getManager
().
find
(
AnalysisSegmentParserModule
.
NAME
).
getService
(
ISegmentParserListenerRegister
.
class
);
//
segmentParserListenerRegister.register(new ServiceReferenceMetricSpanListener.Factory());
segmentParserListenerRegister
.
register
(
new
ServiceReferenceMetricSpanListener
.
Factory
());
segmentParserListenerRegister
.
register
(
new
ApplicationComponentSpanListener
.
Factory
());
segmentParserListenerRegister
.
register
(
new
ApplicationMappingSpanListener
.
Factory
());
segmentParserListenerRegister
.
register
(
new
InstanceMappingSpanListener
.
Factory
());
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentCopy.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* 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.metric.provider.worker.application.component
;
import
org.apache.skywalking.apm.collector.storage.table.application.ApplicationComponent
;
/**
* @author peng-yongsheng
*/
public
class
ApplicationComponentCopy
{
public
static
ApplicationComponent
copy
(
ApplicationComponent
applicationComponent
)
{
ApplicationComponent
newApplicationComponent
=
new
ApplicationComponent
();
newApplicationComponent
.
setId
(
applicationComponent
.
getId
());
newApplicationComponent
.
setMetricId
(
applicationComponent
.
getMetricId
());
newApplicationComponent
.
setComponentId
(
applicationComponent
.
getComponentId
());
newApplicationComponent
.
setPeerId
(
applicationComponent
.
getPeerId
());
newApplicationComponent
.
setTimeBucket
(
newApplicationComponent
.
getTimeBucket
());
return
newApplicationComponent
;
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentDayTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -38,12 +38,8 @@ public class ApplicationComponentDayTransformNode implements NodeProcessor<Appli
public
void
process
(
ApplicationComponent
applicationComponent
,
Next
<
ApplicationComponent
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToDay
(
applicationComponent
.
getTimeBucket
());
ApplicationComponent
newApplicationComponent
=
new
ApplicationComponent
(
);
ApplicationComponent
newApplicationComponent
=
ApplicationComponentCopy
.
copy
(
applicationComponent
);
newApplicationComponent
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
applicationComponent
.
getMetricId
());
newApplicationComponent
.
setMetricId
(
applicationComponent
.
getMetricId
());
newApplicationComponent
.
setComponentId
(
applicationComponent
.
getComponentId
());
newApplicationComponent
.
setPeerId
(
applicationComponent
.
getPeerId
());
newApplicationComponent
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newApplicationComponent
);
}
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentHourTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -38,12 +38,8 @@ public class ApplicationComponentHourTransformNode implements NodeProcessor<Appl
public
void
process
(
ApplicationComponent
applicationComponent
,
Next
<
ApplicationComponent
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToHour
(
applicationComponent
.
getTimeBucket
());
ApplicationComponent
newApplicationComponent
=
new
ApplicationComponent
(
);
ApplicationComponent
newApplicationComponent
=
ApplicationComponentCopy
.
copy
(
applicationComponent
);
newApplicationComponent
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
applicationComponent
.
getMetricId
());
newApplicationComponent
.
setMetricId
(
applicationComponent
.
getMetricId
());
newApplicationComponent
.
setComponentId
(
applicationComponent
.
getComponentId
());
newApplicationComponent
.
setPeerId
(
applicationComponent
.
getPeerId
());
newApplicationComponent
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newApplicationComponent
);
}
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/component/ApplicationComponentMonthTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -38,12 +38,8 @@ public class ApplicationComponentMonthTransformNode implements NodeProcessor<App
public
void
process
(
ApplicationComponent
applicationComponent
,
Next
<
ApplicationComponent
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToMonth
(
applicationComponent
.
getTimeBucket
());
ApplicationComponent
newApplicationComponent
=
new
ApplicationComponent
(
);
ApplicationComponent
newApplicationComponent
=
ApplicationComponentCopy
.
copy
(
applicationComponent
);
newApplicationComponent
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
applicationComponent
.
getMetricId
());
newApplicationComponent
.
setMetricId
(
applicationComponent
.
getMetricId
());
newApplicationComponent
.
setComponentId
(
applicationComponent
.
getComponentId
());
newApplicationComponent
.
setPeerId
(
applicationComponent
.
getPeerId
());
newApplicationComponent
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newApplicationComponent
);
}
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingCopy.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* 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.metric.provider.worker.application.mapping
;
import
org.apache.skywalking.apm.collector.storage.table.application.ApplicationMapping
;
/**
* @author peng-yongsheng
*/
public
class
ApplicationMappingCopy
{
public
static
ApplicationMapping
copy
(
ApplicationMapping
applicationMapping
)
{
ApplicationMapping
newApplicationMapping
=
new
ApplicationMapping
();
newApplicationMapping
.
setId
(
applicationMapping
.
getId
());
newApplicationMapping
.
setMetricId
(
applicationMapping
.
getMetricId
());
newApplicationMapping
.
setTimeBucket
(
applicationMapping
.
getTimeBucket
());
newApplicationMapping
.
setApplicationId
(
applicationMapping
.
getApplicationId
());
newApplicationMapping
.
setAddressId
(
applicationMapping
.
getAddressId
());
return
newApplicationMapping
;
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingDayTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -38,14 +38,9 @@ public class ApplicationMappingDayTransformNode implements NodeProcessor<Applica
public
void
process
(
ApplicationMapping
applicationMapping
,
Next
<
ApplicationMapping
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToDay
(
applicationMapping
.
getTimeBucket
());
ApplicationMapping
newApplicationMapping
=
new
ApplicationMapping
(
);
ApplicationMapping
newApplicationMapping
=
ApplicationMappingCopy
.
copy
(
applicationMapping
);
newApplicationMapping
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
applicationMapping
.
getMetricId
());
newApplicationMapping
.
setMetricId
(
applicationMapping
.
getMetricId
());
newApplicationMapping
.
setTimeBucket
(
timeBucket
);
newApplicationMapping
.
setApplicationId
(
applicationMapping
.
getApplicationId
());
newApplicationMapping
.
setAddressId
(
applicationMapping
.
getAddressId
());
next
.
execute
(
newApplicationMapping
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingHourTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -38,13 +38,9 @@ public class ApplicationMappingHourTransformNode implements NodeProcessor<Applic
public
void
process
(
ApplicationMapping
applicationMapping
,
Next
<
ApplicationMapping
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToHour
(
applicationMapping
.
getTimeBucket
());
ApplicationMapping
newApplicationMapping
=
new
ApplicationMapping
(
);
ApplicationMapping
newApplicationMapping
=
ApplicationMappingCopy
.
copy
(
applicationMapping
);
newApplicationMapping
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
applicationMapping
.
getMetricId
());
newApplicationMapping
.
setMetricId
(
applicationMapping
.
getMetricId
());
newApplicationMapping
.
setTimeBucket
(
timeBucket
);
newApplicationMapping
.
setApplicationId
(
applicationMapping
.
getApplicationId
());
newApplicationMapping
.
setAddressId
(
applicationMapping
.
getAddressId
());
next
.
execute
(
newApplicationMapping
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/application/mapping/ApplicationMappingMonthTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -38,14 +38,9 @@ public class ApplicationMappingMonthTransformNode implements NodeProcessor<Appli
public
void
process
(
ApplicationMapping
applicationMapping
,
Next
<
ApplicationMapping
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToMonth
(
applicationMapping
.
getTimeBucket
());
ApplicationMapping
newApplicationMapping
=
new
ApplicationMapping
(
);
ApplicationMapping
newApplicationMapping
=
ApplicationMappingCopy
.
copy
(
applicationMapping
);
newApplicationMapping
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
applicationMapping
.
getMetricId
());
newApplicationMapping
.
setMetricId
(
applicationMapping
.
getMetricId
());
newApplicationMapping
.
setTimeBucket
(
timeBucket
);
newApplicationMapping
.
setApplicationId
(
applicationMapping
.
getApplicationId
());
newApplicationMapping
.
setAddressId
(
applicationMapping
.
getAddressId
());
next
.
execute
(
newApplicationMapping
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingCopy.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* 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.metric.provider.worker.instance.mapping
;
import
org.apache.skywalking.apm.collector.storage.table.instance.InstanceMapping
;
/**
* @author peng-yongsheng
*/
public
class
InstanceMappingCopy
{
public
static
InstanceMapping
copy
(
InstanceMapping
instanceMapping
)
{
InstanceMapping
newInstanceMapping
=
new
InstanceMapping
();
newInstanceMapping
.
setId
(
instanceMapping
.
getId
());
newInstanceMapping
.
setMetricId
(
instanceMapping
.
getMetricId
());
newInstanceMapping
.
setApplicationId
(
instanceMapping
.
getApplicationId
());
newInstanceMapping
.
setInstanceId
(
instanceMapping
.
getInstanceId
());
newInstanceMapping
.
setAddressId
(
instanceMapping
.
getAddressId
());
newInstanceMapping
.
setTimeBucket
(
instanceMapping
.
getTimeBucket
());
return
newInstanceMapping
;
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingDayTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -37,15 +37,9 @@ public class InstanceMappingDayTransformNode implements NodeProcessor<InstanceMa
@Override
public
void
process
(
InstanceMapping
instanceMapping
,
Next
<
InstanceMapping
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToDay
(
instanceMapping
.
getTimeBucket
());
InstanceMapping
newInstanceMapping
=
new
InstanceMapping
(
);
InstanceMapping
newInstanceMapping
=
InstanceMappingCopy
.
copy
(
instanceMapping
);
newInstanceMapping
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
instanceMapping
.
getMetricId
());
newInstanceMapping
.
setMetricId
(
instanceMapping
.
getMetricId
());
newInstanceMapping
.
setApplicationId
(
instanceMapping
.
getApplicationId
());
newInstanceMapping
.
setInstanceId
(
instanceMapping
.
getInstanceId
());
newInstanceMapping
.
setAddressId
(
instanceMapping
.
getAddressId
());
newInstanceMapping
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newInstanceMapping
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingHourTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -37,15 +37,9 @@ public class InstanceMappingHourTransformNode implements NodeProcessor<InstanceM
@Override
public
void
process
(
InstanceMapping
instanceMapping
,
Next
<
InstanceMapping
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToHour
(
instanceMapping
.
getTimeBucket
());
InstanceMapping
newInstanceMapping
=
new
InstanceMapping
(
);
InstanceMapping
newInstanceMapping
=
InstanceMappingCopy
.
copy
(
instanceMapping
);
newInstanceMapping
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
instanceMapping
.
getMetricId
());
newInstanceMapping
.
setMetricId
(
instanceMapping
.
getMetricId
());
newInstanceMapping
.
setApplicationId
(
instanceMapping
.
getApplicationId
());
newInstanceMapping
.
setInstanceId
(
instanceMapping
.
getInstanceId
());
newInstanceMapping
.
setAddressId
(
instanceMapping
.
getAddressId
());
newInstanceMapping
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newInstanceMapping
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/mapping/InstanceMappingMonthTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -37,15 +37,9 @@ public class InstanceMappingMonthTransformNode implements NodeProcessor<Instance
@Override
public
void
process
(
InstanceMapping
instanceMapping
,
Next
<
InstanceMapping
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToMonth
(
instanceMapping
.
getTimeBucket
());
InstanceMapping
newInstanceMapping
=
new
InstanceMapping
(
);
InstanceMapping
newInstanceMapping
=
InstanceMappingCopy
.
copy
(
instanceMapping
);
newInstanceMapping
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
instanceMapping
.
getMetricId
());
newInstanceMapping
.
setMetricId
(
instanceMapping
.
getMetricId
());
newInstanceMapping
.
setApplicationId
(
instanceMapping
.
getApplicationId
());
newInstanceMapping
.
setInstanceId
(
instanceMapping
.
getInstanceId
());
newInstanceMapping
.
setAddressId
(
instanceMapping
.
getAddressId
());
newInstanceMapping
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newInstanceMapping
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/instance/refmetric/InstanceReferenceMetricGraph.java
浏览文件 @
0eb26f1d
...
...
@@ -64,7 +64,7 @@ public class InstanceReferenceMetricGraph {
remoteNode
.
addNext
(
new
InstanceReferenceMonthMetricTransformNode
())
.
addNext
(
new
InstanceReferenceMonthMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
link
(
graph
);
//
link(graph);
}
private
void
link
(
Graph
<
ServiceReferenceMetric
>
graph
)
{
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/metric/ServiceMetricGraph.java
浏览文件 @
0eb26f1d
...
...
@@ -64,7 +64,7 @@ public class ServiceMetricGraph {
remoteNode
.
addNext
(
new
ServiceMonthMetricTransformNode
())
.
addNext
(
new
ServiceMonthMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
link
(
graph
);
//
link(graph);
}
private
void
link
(
Graph
<
ServiceReferenceMetric
>
graph
)
{
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceDayMetricTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -36,9 +36,11 @@ public class ServiceReferenceDayMetricTransformNode implements NodeProcessor<Ser
@Override
public
void
process
(
ServiceReferenceMetric
serviceReferenceMetric
,
Next
<
ServiceReferenceMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToDay
(
serviceReferenceMetric
.
getTimeBucket
());
serviceReferenceMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getMetricId
());
serviceReferenceMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
serviceReferenceMetric
);
ServiceReferenceMetric
newServiceReferenceMetric
=
ServiceReferenceMetricCopy
.
copy
(
serviceReferenceMetric
);
newServiceReferenceMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getMetricId
());
newServiceReferenceMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newServiceReferenceMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceHourMetricTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -36,9 +36,11 @@ public class ServiceReferenceHourMetricTransformNode implements NodeProcessor<Se
@Override
public
void
process
(
ServiceReferenceMetric
serviceReferenceMetric
,
Next
<
ServiceReferenceMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToHour
(
serviceReferenceMetric
.
getTimeBucket
());
serviceReferenceMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getMetricId
());
serviceReferenceMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
serviceReferenceMetric
);
ServiceReferenceMetric
newServiceReferenceMetric
=
ServiceReferenceMetricCopy
.
copy
(
serviceReferenceMetric
);
newServiceReferenceMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getMetricId
());
newServiceReferenceMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newServiceReferenceMetric
);
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricCopy.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* 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.metric.provider.worker.service.refmetric
;
import
org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetric
;
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceMetricCopy
{
public
static
ServiceReferenceMetric
copy
(
ServiceReferenceMetric
serviceReferenceMetric
)
{
ServiceReferenceMetric
newServiceReferenceMetric
=
new
ServiceReferenceMetric
();
newServiceReferenceMetric
.
setId
(
serviceReferenceMetric
.
getId
());
newServiceReferenceMetric
.
setMetricId
(
serviceReferenceMetric
.
getMetricId
());
newServiceReferenceMetric
.
setSourceValue
(
serviceReferenceMetric
.
getSourceValue
());
newServiceReferenceMetric
.
setFrontApplicationId
(
serviceReferenceMetric
.
getFrontApplicationId
());
newServiceReferenceMetric
.
setFrontInstanceId
(
serviceReferenceMetric
.
getFrontInstanceId
());
newServiceReferenceMetric
.
setFrontServiceId
(
serviceReferenceMetric
.
getFrontServiceId
());
newServiceReferenceMetric
.
setBehindApplicationId
(
serviceReferenceMetric
.
getBehindApplicationId
());
newServiceReferenceMetric
.
setBehindInstanceId
(
serviceReferenceMetric
.
getBehindInstanceId
());
newServiceReferenceMetric
.
setBehindServiceId
(
serviceReferenceMetric
.
getBehindServiceId
());
newServiceReferenceMetric
.
setTransactionCalls
(
serviceReferenceMetric
.
getTransactionCalls
());
newServiceReferenceMetric
.
setTransactionDurationSum
(
serviceReferenceMetric
.
getTransactionDurationSum
());
newServiceReferenceMetric
.
setTransactionErrorCalls
(
serviceReferenceMetric
.
getTransactionErrorCalls
());
newServiceReferenceMetric
.
setTransactionErrorDurationSum
(
serviceReferenceMetric
.
getTransactionErrorDurationSum
());
newServiceReferenceMetric
.
setBusinessTransactionCalls
(
serviceReferenceMetric
.
getBusinessTransactionCalls
());
newServiceReferenceMetric
.
setBusinessTransactionDurationSum
(
serviceReferenceMetric
.
getBusinessTransactionDurationSum
());
newServiceReferenceMetric
.
setBusinessTransactionErrorCalls
(
serviceReferenceMetric
.
getBusinessTransactionErrorCalls
());
newServiceReferenceMetric
.
setBusinessTransactionErrorDurationSum
(
serviceReferenceMetric
.
getBusinessTransactionErrorDurationSum
());
newServiceReferenceMetric
.
setMqTransactionCalls
(
serviceReferenceMetric
.
getMqTransactionCalls
());
newServiceReferenceMetric
.
setMqTransactionDurationSum
(
serviceReferenceMetric
.
getMqTransactionDurationSum
());
newServiceReferenceMetric
.
setMqTransactionErrorCalls
(
serviceReferenceMetric
.
getMqTransactionErrorCalls
());
newServiceReferenceMetric
.
setMqTransactionErrorDurationSum
(
serviceReferenceMetric
.
getMqTransactionErrorDurationSum
());
newServiceReferenceMetric
.
setTimeBucket
(
serviceReferenceMetric
.
getTimeBucket
());
return
newServiceReferenceMetric
;
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricGraph.java
浏览文件 @
0eb26f1d
...
...
@@ -44,8 +44,8 @@ public class ServiceReferenceMetricGraph {
RemoteSenderService
remoteSenderService
=
moduleManager
.
find
(
RemoteModule
.
NAME
).
getService
(
RemoteSenderService
.
class
);
Node
<
ServiceReferenceMetric
,
ServiceReferenceMetric
>
remoteNode
=
GraphManager
.
INSTANCE
.
createIfAbsent
(
MetricGraphIdDefine
.
SERVICE_REFERENCE_METRIC_GRAPH_ID
,
ServiceReferenceMetric
.
class
)
.
addNode
(
new
ServiceReferenceMetricAggregationWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
))
.
addNext
(
new
ServiceReferenceMetricRemoteWorker
.
Factory
(
moduleManager
,
remoteSenderService
,
MetricGraphIdDefine
.
SERVICE_REFERENCE_METRIC_GRAPH_ID
).
create
(
workerCreateListener
));
.
addNode
(
new
ServiceReferenceM
inuteM
etricAggregationWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
))
.
addNext
(
new
ServiceReferenceM
inuteM
etricRemoteWorker
.
Factory
(
moduleManager
,
remoteSenderService
,
MetricGraphIdDefine
.
SERVICE_REFERENCE_METRIC_GRAPH_ID
).
create
(
workerCreateListener
));
remoteNode
.
addNext
(
new
ServiceReferenceMinuteMetricPersistenceWorker
.
Factory
(
moduleManager
).
create
(
workerCreateListener
));
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricSpanListener.java
浏览文件 @
0eb26f1d
...
...
@@ -152,9 +152,11 @@ public class ServiceReferenceMetricSpanListener implements FirstSpanListener, En
logger
.
debug
(
"service reference listener build"
);
Graph
<
ServiceReferenceMetric
>
graph
=
GraphManager
.
INSTANCE
.
findGraph
(
MetricGraphIdDefine
.
SERVICE_REFERENCE_METRIC_GRAPH_ID
,
ServiceReferenceMetric
.
class
);
entryReferenceMetric
.
forEach
(
serviceReferenceMetric
->
{
String
id
=
timeBucket
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getFrontServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getBehindServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getSourceValue
();
String
metricId
=
serviceReferenceMetric
.
getFrontServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getBehindServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getSourceValue
();
String
id
=
timeBucket
+
Const
.
ID_SPLIT
+
metricId
;
serviceReferenceMetric
.
setId
(
id
);
serviceReferenceMetric
.
setMetricId
(
metricId
);
serviceReferenceMetric
.
setTimeBucket
(
timeBucket
);
logger
.
debug
(
"push to service reference aggregation worker, id: {}"
,
serviceReferenceMetric
.
getId
());
...
...
@@ -168,8 +170,10 @@ public class ServiceReferenceMetricSpanListener implements FirstSpanListener, En
serviceReferenceMetric
.
setFrontServiceId
(
Const
.
NONE_SERVICE_ID
);
}
String
id
=
timeBucket
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getFrontServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getBehindServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getSourceValue
();
String
metricId
=
serviceReferenceMetric
.
getFrontServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getBehindServiceId
()
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getSourceValue
();
String
id
=
timeBucket
+
Const
.
ID_SPLIT
+
metricId
;
serviceReferenceMetric
.
setId
(
id
);
serviceReferenceMetric
.
setMetricId
(
metricId
);
serviceReferenceMetric
.
setTimeBucket
(
timeBucket
);
graph
.
start
(
serviceReferenceMetric
);
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricAggregationWorker.java
→
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceM
inuteM
etricAggregationWorker.java
浏览文件 @
0eb26f1d
...
...
@@ -27,9 +27,9 @@ import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenc
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceMetricAggregationWorker
extends
AggregationWorker
<
ServiceReferenceMetric
,
ServiceReferenceMetric
>
{
public
class
ServiceReferenceM
inuteM
etricAggregationWorker
extends
AggregationWorker
<
ServiceReferenceMetric
,
ServiceReferenceMetric
>
{
public
ServiceReferenceMetricAggregationWorker
(
ModuleManager
moduleManager
)
{
public
ServiceReferenceM
inuteM
etricAggregationWorker
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
...
...
@@ -37,14 +37,14 @@ public class ServiceReferenceMetricAggregationWorker extends AggregationWorker<S
return
MetricWorkerIdDefine
.
SERVICE_REFERENCE_MINUTE_METRIC_AGGREGATION_WORKER_ID
;
}
public
static
class
Factory
extends
AbstractLocalAsyncWorkerProvider
<
ServiceReferenceMetric
,
ServiceReferenceMetric
,
ServiceReferenceMetricAggregationWorker
>
{
public
static
class
Factory
extends
AbstractLocalAsyncWorkerProvider
<
ServiceReferenceMetric
,
ServiceReferenceMetric
,
ServiceReferenceM
inuteM
etricAggregationWorker
>
{
public
Factory
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
@Override
public
ServiceReferenceMetricAggregationWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
ServiceReferenceMetricAggregationWorker
(
moduleManager
);
@Override
public
ServiceReferenceM
inuteM
etricAggregationWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
ServiceReferenceM
inuteM
etricAggregationWorker
(
moduleManager
);
}
@Override
...
...
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMetricRemoteWorker.java
→
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceM
inuteM
etricRemoteWorker.java
浏览文件 @
0eb26f1d
...
...
@@ -30,9 +30,9 @@ import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenc
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceMetricRemoteWorker
extends
AbstractRemoteWorker
<
ServiceReferenceMetric
,
ServiceReferenceMetric
>
{
public
class
ServiceReferenceM
inuteM
etricRemoteWorker
extends
AbstractRemoteWorker
<
ServiceReferenceMetric
,
ServiceReferenceMetric
>
{
public
ServiceReferenceMetricRemoteWorker
(
ModuleManager
moduleManager
)
{
public
ServiceReferenceM
inuteM
etricRemoteWorker
(
ModuleManager
moduleManager
)
{
super
(
moduleManager
);
}
...
...
@@ -48,14 +48,14 @@ public class ServiceReferenceMetricRemoteWorker extends AbstractRemoteWorker<Ser
return
Selector
.
HashCode
;
}
public
static
class
Factory
extends
AbstractRemoteWorkerProvider
<
ServiceReferenceMetric
,
ServiceReferenceMetric
,
ServiceReferenceMetricRemoteWorker
>
{
public
static
class
Factory
extends
AbstractRemoteWorkerProvider
<
ServiceReferenceMetric
,
ServiceReferenceMetric
,
ServiceReferenceM
inuteM
etricRemoteWorker
>
{
public
Factory
(
ModuleManager
moduleManager
,
RemoteSenderService
remoteSenderService
,
int
graphId
)
{
super
(
moduleManager
,
remoteSenderService
,
graphId
);
}
@Override
public
ServiceReferenceMetricRemoteWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
ServiceReferenceMetricRemoteWorker
(
moduleManager
);
@Override
public
ServiceReferenceM
inuteM
etricRemoteWorker
workerInstance
(
ModuleManager
moduleManager
)
{
return
new
ServiceReferenceM
inuteM
etricRemoteWorker
(
moduleManager
);
}
}
}
apm-collector/apm-collector-analysis/analysis-metric/metric-provider/src/main/java/org/apache/skywalking/apm/collector/analysis/metric/provider/worker/service/refmetric/ServiceReferenceMonthMetricTransformNode.java
浏览文件 @
0eb26f1d
...
...
@@ -36,9 +36,11 @@ public class ServiceReferenceMonthMetricTransformNode implements NodeProcessor<S
@Override
public
void
process
(
ServiceReferenceMetric
serviceReferenceMetric
,
Next
<
ServiceReferenceMetric
>
next
)
{
long
timeBucket
=
TimeBucketUtils
.
INSTANCE
.
minuteToMonth
(
serviceReferenceMetric
.
getTimeBucket
());
serviceReferenceMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getMetricId
());
serviceReferenceMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
serviceReferenceMetric
);
ServiceReferenceMetric
newServiceReferenceMetric
=
ServiceReferenceMetricCopy
.
copy
(
serviceReferenceMetric
);
newServiceReferenceMetric
.
setId
(
String
.
valueOf
(
timeBucket
)
+
Const
.
ID_SPLIT
+
serviceReferenceMetric
.
getMetricId
());
newServiceReferenceMetric
.
setTimeBucket
(
timeBucket
);
next
.
execute
(
newServiceReferenceMetric
);
}
}
apm-collector/apm-collector-storage/collector-storage-define/src/main/java/org/apache/skywalking/apm/collector/storage/StorageModule.java
浏览文件 @
0eb26f1d
...
...
@@ -80,7 +80,10 @@ import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegiste
import
org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.IServiceNameRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO
;
/**
* @author peng-yongsheng
...
...
@@ -146,8 +149,16 @@ public class StorageModule extends Module {
classes
.
add
(
IApplicationReferenceMinuteMetricPersistenceDAO
.
class
);
classes
.
add
(
ISegmentCostPersistenceDAO
.
class
);
classes
.
add
(
ISegmentPersistenceDAO
.
class
);
classes
.
add
(
IServiceMinuteMetricPersistenceDAO
.
class
);
// classes.add(IServiceHourMetricPersistenceDAO.class);
// classes.add(IServiceDayMetricPersistenceDAO.class);
// classes.add(IServiceMonthMetricPersistenceDAO.class);
classes
.
add
(
IServiceReferenceMinuteMetricPersistenceDAO
.
class
);
classes
.
add
(
IServiceReferenceHourMetricPersistenceDAO
.
class
);
classes
.
add
(
IServiceReferenceDayMetricPersistenceDAO
.
class
);
classes
.
add
(
IServiceReferenceMonthMetricPersistenceDAO
.
class
);
classes
.
add
(
IInstanceMinuteMetricPersistenceDAO
.
class
);
classes
.
add
(
IInstanceReferenceMinuteMetricPersistenceDAO
.
class
);
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/StorageModuleEsProvider.java
浏览文件 @
0eb26f1d
...
...
@@ -89,7 +89,10 @@ import org.apache.skywalking.apm.collector.storage.dao.register.IInstanceRegiste
import
org.apache.skywalking.apm.collector.storage.dao.register.INetworkAddressRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.register.IServiceNameRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.smp.IServiceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceDayMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceHourMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMinuteMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.dao.srmp.IServiceReferenceMonthMetricPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.base.dao.BatchEsDAO
;
import
org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchStorageInstaller
;
import
org.apache.skywalking.apm.collector.storage.es.dao.ApplicationAlarmEsPersistenceDAO
;
...
...
@@ -150,7 +153,10 @@ import org.apache.skywalking.apm.collector.storage.es.dao.register.InstanceEsReg
import
org.apache.skywalking.apm.collector.storage.es.dao.register.NetworkAddressRegisterEsDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.register.ServiceNameEsRegisterDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.smp.ServiceMinuteMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.srmp.ServiceReferenceDayMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.srmp.ServiceReferenceHourMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.srmp.ServiceReferenceMinuteMetricEsPersistenceDAO
;
import
org.apache.skywalking.apm.collector.storage.es.dao.srmp.ServiceReferenceMonthMetricEsPersistenceDAO
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -263,11 +269,17 @@ public class StorageModuleEsProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
IGlobalTracePersistenceDAO
.
class
,
new
GlobalTraceEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IApplicationMinuteMetricPersistenceDAO
.
class
,
new
ApplicationMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IApplicationReferenceMinuteMetricPersistenceDAO
.
class
,
new
ApplicationReferenceMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
ISegmentCostPersistenceDAO
.
class
,
new
SegmentCostEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
ISegmentPersistenceDAO
.
class
,
new
SegmentEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IServiceMinuteMetricPersistenceDAO
.
class
,
new
ServiceMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IServiceReferenceMinuteMetricPersistenceDAO
.
class
,
new
ServiceReferenceMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IServiceReferenceHourMetricPersistenceDAO
.
class
,
new
ServiceReferenceHourMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IServiceReferenceDayMetricPersistenceDAO
.
class
,
new
ServiceReferenceDayMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IServiceReferenceMonthMetricPersistenceDAO
.
class
,
new
ServiceReferenceMonthMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IInstanceMinuteMetricPersistenceDAO
.
class
,
new
InstanceMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
this
.
registerServiceImplementation
(
IInstanceReferenceMinuteMetricPersistenceDAO
.
class
,
new
InstanceReferenceMinuteMetricEsPersistenceDAO
(
elasticSearchClient
));
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/ServiceReferenceMetricEsTableDefine.java
→
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/
srmp/Abstract
ServiceReferenceMetricEsTableDefine.java
浏览文件 @
0eb26f1d
...
...
@@ -16,7 +16,7 @@
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define
;
package
org.apache.skywalking.apm.collector.storage.es.define
.srmp
;
import
org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchColumnDefine
;
import
org.apache.skywalking.apm.collector.storage.es.base.define.ElasticSearchTableDefine
;
...
...
@@ -25,17 +25,15 @@ import org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenc
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceMetricEsTableDefine
extends
ElasticSearchTableDefine
{
public
abstract
class
Abstract
ServiceReferenceMetricEsTableDefine
extends
ElasticSearchTableDefine
{
public
ServiceReferenceMetricEsTableDefine
(
)
{
super
(
ServiceReferenceMetricTable
.
TABLE
);
public
AbstractServiceReferenceMetricEsTableDefine
(
String
name
)
{
super
(
name
);
}
@Override
public
int
refreshInterval
()
{
return
2
;
}
@Override
public
final
void
initialize
()
{
addColumn
(
new
ElasticSearchColumnDefine
(
ServiceReferenceMetricTable
.
COLUMN_METRIC_ID
,
ElasticSearchColumnDefine
.
Type
.
Keyword
.
name
()));
@Override
public
void
initialize
()
{
addColumn
(
new
ElasticSearchColumnDefine
(
ServiceReferenceMetricTable
.
COLUMN_FRONT_SERVICE_ID
,
ElasticSearchColumnDefine
.
Type
.
Integer
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
ServiceReferenceMetricTable
.
COLUMN_BEHIND_SERVICE_ID
,
ElasticSearchColumnDefine
.
Type
.
Integer
.
name
()));
addColumn
(
new
ElasticSearchColumnDefine
(
ServiceReferenceMetricTable
.
COLUMN_SOURCE_VALUE
,
ElasticSearchColumnDefine
.
Type
.
Integer
.
name
()));
...
...
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceDayMetricEsTableDefine.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.srmp
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceDayMetricEsTableDefine
extends
AbstractServiceReferenceMetricEsTableDefine
{
public
ServiceReferenceDayMetricEsTableDefine
()
{
super
(
ServiceReferenceMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Day
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
2
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceHourMetricEsTableDefine.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.srmp
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceHourMetricEsTableDefine
extends
AbstractServiceReferenceMetricEsTableDefine
{
public
ServiceReferenceHourMetricEsTableDefine
()
{
super
(
ServiceReferenceMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Hour
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
2
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceMinuteMetricEsTableDefine.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.srmp
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceMinuteMetricEsTableDefine
extends
AbstractServiceReferenceMetricEsTableDefine
{
public
ServiceReferenceMinuteMetricEsTableDefine
()
{
super
(
ServiceReferenceMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Minute
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
2
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/define/srmp/ServiceReferenceMonthMetricEsTableDefine.java
0 → 100644
浏览文件 @
0eb26f1d
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org.apache.skywalking.apm.collector.storage.es.define.srmp
;
import
org.apache.skywalking.apm.collector.core.storage.TimePyramid
;
import
org.apache.skywalking.apm.collector.core.util.Const
;
import
org.apache.skywalking.apm.collector.storage.table.service.ServiceReferenceMetricTable
;
/**
* @author peng-yongsheng
*/
public
class
ServiceReferenceMonthMetricEsTableDefine
extends
AbstractServiceReferenceMetricEsTableDefine
{
public
ServiceReferenceMonthMetricEsTableDefine
()
{
super
(
ServiceReferenceMetricTable
.
TABLE
+
Const
.
ID_SPLIT
+
TimePyramid
.
Month
.
getName
());
}
@Override
public
int
refreshInterval
()
{
return
2
;
}
}
apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/resources/META-INF/defines/storage.define
浏览文件 @
0eb26f1d
...
...
@@ -18,6 +18,11 @@ org.apache.skywalking.apm.collector.storage.es.define.instmapping.InstanceMappin
org.apache.skywalking.apm.collector.storage.es.define.instmapping.InstanceMappingDayEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.instmapping.InstanceMappingMonthEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.srmp.ServiceReferenceMinuteMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.srmp.ServiceReferenceHourMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.srmp.ServiceReferenceDayMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.srmp.ServiceReferenceMonthMetricEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.GlobalTraceEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.SegmentEsTableDefine
org.apache.skywalking.apm.collector.storage.es.define.SegmentCostEsTableDefine
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录