Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
097a8b72
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
097a8b72
编写于
7月 15, 2021
作者:
wu-sheng
提交者:
GitHub
7月 15, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reduce the flush period of hour and day level metrics (#7299)
上级
ff7c8fa8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
34 addition
and
6 deletion
+34
-6
CHANGES.md
CHANGES.md
+6
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java
.../server/core/analysis/worker/MetricsPersistentWorker.java
+18
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetadataQueryService.java
...kywalking/oap/server/core/query/MetadataQueryService.java
+10
-6
未找到文件。
CHANGES.md
浏览文件 @
097a8b72
...
...
@@ -88,8 +88,13 @@ Release Notes.
*
Remove
`syncBulkActions`
in ElasticSearch storage option.
*
Increase the default bulkActions(env, SW_STORAGE_ES_BULK_ACTIONS) to 5000(from 1000).
*
Increase the flush interval of ElasticSearch indices to 15s(from 10s)
*
Provide distinct for elements of metadata lists. Due to the more aggressive asynchronous flush, metadata lists have
more chances including duplicate elements. Don't need this as indicate anymore.
*
Reduce the flush period of hour and day level metrics, only run in 4 times of regular persistent period. This means
default flush period of hour and day level metrics are 25s
*
4.
#### UI
*
Fix the date component for log conditions.
*
Fix selector keys for duplicate options.
*
Add Python celery plugin.
...
...
@@ -99,6 +104,7 @@ Release Notes.
*
Fix chart types for setting metrics configure.
#### Documentation
*
Add FAQ about
`Elasticsearch exception type=version_conflict_engine_exception since 8.7.0`
All issues and pull requests are
[
here
](
https://github.com/apache/skywalking/milestone/90?closed=1
)
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java
浏览文件 @
097a8b72
...
...
@@ -67,6 +67,16 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
private
final
boolean
supportUpdate
;
private
long
sessionTimeout
;
private
CounterMetrics
aggregationCounter
;
/**
* The counter for the round of persistent.
*/
private
int
persistentCounter
;
/**
* The mod value to control persistent. The MetricsPersistentWorker is driven by the {@link
* org.apache.skywalking.oap.server.core.storage.PersistenceTimer}. The down sampling level workers only execute in
* every {@link #persistentMod} periods. And minute level workers execute every time.
*/
private
int
persistentMod
;
MetricsPersistentWorker
(
ModuleDefineHolder
moduleDefineHolder
,
Model
model
,
IMetricsDAO
metricsDAO
,
AbstractWorker
<
Metrics
>
nextAlarmWorker
,
AbstractWorker
<
ExportEvent
>
nextExportWorker
,
...
...
@@ -82,6 +92,8 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
this
.
transWorker
=
Optional
.
ofNullable
(
transWorker
);
this
.
supportUpdate
=
supportUpdate
;
this
.
sessionTimeout
=
storageSessionTimeout
;
this
.
persistentCounter
=
0
;
this
.
persistentMod
=
1
;
String
name
=
"METRICS_L2_AGGREGATION"
;
int
size
=
BulkConsumePool
.
Creator
.
recommendMaxSize
()
/
8
;
...
...
@@ -122,6 +134,8 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
// And add offset according to worker creation sequence, to avoid context clear overlap,
// eventually optimize load of IDs reading.
this
.
sessionTimeout
=
this
.
sessionTimeout
*
4
+
SESSION_TIMEOUT_OFFSITE_COUNTER
*
200
;
// The down sampling level worker executes every 4 periods.
this
.
persistentMod
=
4
;
}
/**
...
...
@@ -135,6 +149,10 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
@Override
public
void
prepareBatch
(
Collection
<
Metrics
>
lastCollection
,
List
<
PrepareRequest
>
prepareRequests
)
{
if
(
persistentCounter
++
%
persistentMod
!=
0
)
{
return
;
}
long
start
=
System
.
currentTimeMillis
();
if
(
lastCollection
.
size
()
==
0
)
{
return
;
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetadataQueryService.java
浏览文件 @
097a8b72
...
...
@@ -54,30 +54,34 @@ public class MetadataQueryService implements org.apache.skywalking.oap.server.li
if
(
service
.
getGroup
()
==
null
)
{
service
.
setGroup
(
Const
.
EMPTY_STRING
);
}
}).
collect
(
Collectors
.
toList
());
})
.
distinct
()
.
collect
(
Collectors
.
toList
());
}
public
List
<
Service
>
getAllBrowserServices
()
throws
IOException
{
return
getMetadataQueryDAO
().
getAllBrowserServices
();
return
getMetadataQueryDAO
().
getAllBrowserServices
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
public
List
<
Database
>
getAllDatabases
()
throws
IOException
{
return
getMetadataQueryDAO
().
getAllDatabases
();
return
getMetadataQueryDAO
().
getAllDatabases
()
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
public
List
<
Service
>
searchServices
(
final
long
startTimestamp
,
final
long
endTimestamp
,
final
String
keyword
)
throws
IOException
{
return
getMetadataQueryDAO
().
searchServices
(
keyword
);
return
getMetadataQueryDAO
().
searchServices
(
keyword
)
.
stream
().
distinct
().
collect
(
Collectors
.
toList
())
;
}
public
List
<
ServiceInstance
>
getServiceInstances
(
final
long
startTimestamp
,
final
long
endTimestamp
,
final
String
serviceId
)
throws
IOException
{
return
getMetadataQueryDAO
().
getServiceInstances
(
startTimestamp
,
endTimestamp
,
serviceId
);
return
getMetadataQueryDAO
().
getServiceInstances
(
startTimestamp
,
endTimestamp
,
serviceId
)
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
public
List
<
Endpoint
>
searchEndpoint
(
final
String
keyword
,
final
String
serviceId
,
final
int
limit
)
throws
IOException
{
return
getMetadataQueryDAO
().
searchEndpoint
(
keyword
,
serviceId
,
limit
);
return
getMetadataQueryDAO
().
searchEndpoint
(
keyword
,
serviceId
,
limit
)
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
public
Service
searchService
(
final
String
serviceCode
)
throws
IOException
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录