Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
9652d7ed
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,发现更多精彩内容 >>
未验证
提交
9652d7ed
编写于
11月 30, 2018
作者:
a198720
提交者:
GitHub
11月 30, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into len
上级
efad1165
728033ce
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
22 deletion
+21
-22
docs/en/setup/backend/backend-storage.md
docs/en/setup/backend/backend-storage.md
+11
-13
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/TraceQueryService.java
...e/skywalking/oap/server/core/query/TraceQueryService.java
+7
-9
oap-server/server-starter/src/main/assembly/application.yml
oap-server/server-starter/src/main/assembly/application.yml
+2
-0
oap-server/server-starter/src/main/resources/application.yml
oap-server/server-starter/src/main/resources/application.yml
+1
-0
未找到文件。
docs/en/setup/backend/backend-storage.md
浏览文件 @
9652d7ed
...
...
@@ -27,24 +27,22 @@ Active ElasticSearch 6 as storage, set storage provider to **elasticsearch**.
> Required ElasticSearch 6.3.0 or higher.
Setting fragment example
```
yaml
storage
:
elasticsearch
:
clusterNodes
:
localhost:9200
indexShardsNumber
:
2
indexReplicasNumber
:
0
# nameSpace: ${SW_STORAGE_ES_NAMESPACE:""}
clusterNodes
:
${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200}
indexShardsNumber
:
${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2}
indexReplicasNumber
:
${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:0}
# Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html
bulkActions
:
2000
# Execute the bulk every 2000 requests
bulkSize
:
20
# flush the bulk every 20mb
flushInterval
:
10
# flush the bulk every 10 seconds whatever the number of requests
concurrentRequests
:
2
# the number of concurrent requests
# Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted.
traceDataTTL
:
90
# Unit is minute
minuteMetricDataTTL
:
90
# Unit is minute
hourMetricDataTTL
:
36
# Unit is hour
dayMetricDataTTL
:
45
# Unit is day
monthMetricDataTTL
:
18
# Unit is month
bulkActions
:
${SW_STORAGE_ES_BULK_ACTIONS:2000}
# Execute the bulk every 2000 requests
bulkSize
:
${SW_STORAGE_ES_BULK_SIZE:20}
# flush the bulk every 20mb
flushInterval
:
${SW_STORAGE_ES_FLUSH_INTERVAL:10}
# flush the bulk every 10 seconds whatever the number of requests
concurrentRequests
:
${SW_STORAGE_ES_CONCURRENT_REQUESTS:2}
# the number of concurrent requests
```
### About Namespace
When namespace is set, names of all indexes in ElasticSearch will use it as prefix.
## MySQL
Active MySQL as storage, set storage provider to
**mysql**
.
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/TraceQueryService.java
浏览文件 @
9652d7ed
...
...
@@ -21,19 +21,19 @@ package org.apache.skywalking.oap.server.core.query;
import
java.io.IOException
;
import
java.util.*
;
import
org.apache.skywalking.apm.network.language.agent.*
;
import
org.apache.skywalking.apm.network.language.agent.v2.SegmentObject
;
import
org.apache.skywalking.apm.network.language.agent.v2.SpanObjectV2
;
import
org.apache.skywalking.apm.network.language.agent.v2.*
;
import
org.apache.skywalking.oap.server.core.*
;
import
org.apache.skywalking.oap.server.core.analysis.manual.segment.SegmentRecord
;
import
org.apache.skywalking.oap.server.core.cache.*
;
import
org.apache.skywalking.oap.server.core.config.IComponentLibraryCatalogService
;
import
org.apache.skywalking.oap.server.core.query.entity.*
;
import
org.apache.skywalking.oap.server.core.query.entity.RefType
;
import
org.apache.skywalking.oap.server.core.query.entity.Trace
;
import
org.apache.skywalking.oap.server.core.query.entity.*
;
import
org.apache.skywalking.oap.server.core.register.EndpointInventory
;
import
org.apache.skywalking.oap.server.core.storage.StorageModule
;
import
org.apache.skywalking.oap.server.core.storage.query.ITraceQueryDAO
;
import
org.apache.skywalking.oap.server.library.module.*
;
import
org.apache.skywalking.oap.server.library.module.Service
;
import
org.apache.skywalking.oap.server.library.module.*
;
import
org.apache.skywalking.oap.server.library.util.CollectionUtils
;
import
static
java
.
util
.
Objects
.
nonNull
;
...
...
@@ -105,14 +105,12 @@ public class TraceQueryService implements Service {
List
<
SegmentRecord
>
segmentRecords
=
getTraceQueryDAO
().
queryByTraceId
(
traceId
);
for
(
SegmentRecord
segment
:
segmentRecords
)
{
if
(
nonNull
(
segment
))
{
if
(
segment
.
getVersion
()
==
1
)
{
TraceSegmentObject
segmentObject
=
TraceSegmentObject
.
parseFrom
(
segment
.
getDataBinary
());
trace
.
getSpans
().
addAll
(
buildSpanList
(
traceId
,
segment
.
getSegmentId
(),
segment
.
getServiceId
(),
segmentObject
.
getSpansList
()));
}
else
if
(
segment
.
getVersion
()
==
2
)
{
if
(
segment
.
getVersion
()
==
2
)
{
SegmentObject
segmentObject
=
SegmentObject
.
parseFrom
(
segment
.
getDataBinary
());
trace
.
getSpans
().
addAll
(
buildSpanV2List
(
traceId
,
segment
.
getSegmentId
(),
segment
.
getServiceId
(),
segmentObject
.
getSpansList
()));
}
else
{
throw
new
UnexpectedException
(
"Unsupported version="
+
segment
.
getVersion
());
TraceSegmentObject
segmentObject
=
TraceSegmentObject
.
parseFrom
(
segment
.
getDataBinary
());
trace
.
getSpans
().
addAll
(
buildSpanList
(
traceId
,
segment
.
getSegmentId
(),
segment
.
getServiceId
(),
segmentObject
.
getSpansList
()));
}
}
}
...
...
oap-server/server-starter/src/main/assembly/application.yml
浏览文件 @
9652d7ed
...
...
@@ -51,6 +51,7 @@ storage:
url
:
${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db}
user
:
${SW_STORAGE_H2_USER:sa}
# elasticsearch:
# # nameSpace: ${SW_STORAGE_ES_NAMESPACE:""}
# clusterNodes: ${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200}
# indexShardsNumber: ${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2}
# indexReplicasNumber: ${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:0}
...
...
@@ -59,6 +60,7 @@ storage:
# bulkSize: ${SW_STORAGE_ES_BULK_SIZE:20} # flush the bulk every 20mb
# flushInterval: ${SW_STORAGE_ES_FLUSH_INTERVAL:10} # flush the bulk every 10 seconds whatever the number of requests
# concurrentRequests: ${SW_STORAGE_ES_CONCURRENT_REQUESTS:2} # the number of concurrent requests
# mysql:
receiver-register
:
default
:
receiver-trace
:
...
...
oap-server/server-starter/src/main/resources/application.yml
浏览文件 @
9652d7ed
...
...
@@ -47,6 +47,7 @@ core:
monthMetricsDataTTL
:
${SW_CORE_MONTH_METRIC_DATA_TTL:18}
# Unit is month
storage
:
elasticsearch
:
# nameSpace: ${SW_STORAGE_ES_NAMESPACE:""}
clusterNodes
:
${SW_STORAGE_ES_CLUSTER_NODES:localhost:9200}
indexShardsNumber
:
${SW_STORAGE_ES_INDEX_SHARDS_NUMBER:2}
indexReplicasNumber
:
${SW_STORAGE_ES_INDEX_REPLICAS_NUMBER:0}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录