Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
SkyWalking
提交
25ebd6c2
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,发现更多精彩内容 >>
未验证
提交
25ebd6c2
编写于
5月 21, 2022
作者:
J
Jiajing LU
提交者:
GitHub
5月 21, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Banyandb storage e2e (#9112)
上级
8b40d226
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
364 addition
and
32 deletion
+364
-32
.github/workflows/skywalking.yaml
.github/workflows/skywalking.yaml
+6
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/cache/ProfileTaskCache.java
...he/skywalking/oap/server/core/cache/ProfileTaskCache.java
+2
-2
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/trace/ProfileTaskMutationService.java
...rver/core/profiling/trace/ProfileTaskMutationService.java
+3
-4
oap-server/server-starter/src/main/resources/application.yml
oap-server/server-starter/src/main/resources/application.yml
+1
-1
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageConfig.java
...server/storage/plugin/banyandb/BanyanDBStorageConfig.java
+2
-2
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageProvider.java
...rver/storage/plugin/banyandb/BanyanDBStorageProvider.java
+3
-3
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/measure/BanyanDBTopologyQueryDAO.java
...age/plugin/banyandb/measure/BanyanDBTopologyQueryDAO.java
+13
-8
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/BanyanDBProfileTaskLogQueryDAO.java
...lugin/banyandb/stream/BanyanDBProfileTaskLogQueryDAO.java
+3
-7
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/BanyanDBProfileTaskQueryDAO.java
...e/plugin/banyandb/stream/BanyanDBProfileTaskQueryDAO.java
+13
-4
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/BanyanDBProfileThreadSnapshotQueryDAO.java
...anyandb/stream/BanyanDBProfileThreadSnapshotQueryDAO.java
+5
-1
test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml
test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml
+65
-0
test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml
test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml
+37
-0
test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml
.../e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml
+56
-0
test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
+37
-0
test/e2e-v2/cases/storage/banyandb/docker-compose.yml
test/e2e-v2/cases/storage/banyandb/docker-compose.yml
+70
-0
test/e2e-v2/cases/storage/banyandb/e2e.yaml
test/e2e-v2/cases/storage/banyandb/e2e.yaml
+47
-0
test/e2e-v2/script/env
test/e2e-v2/script/env
+1
-0
未找到文件。
.github/workflows/skywalking.yaml
浏览文件 @
25ebd6c2
...
...
@@ -285,6 +285,8 @@ jobs:
-
name
:
Agent Lua
config
:
test/e2e-v2/cases/lua/e2e.yaml
-
name
:
BanyanDB
config
:
test/e2e-v2/cases/storage/banyandb/e2e.yaml
-
name
:
Storage H2
config
:
test/e2e-v2/cases/storage/h2/e2e.yaml
-
name
:
Storage MySQL
...
...
@@ -398,6 +400,8 @@ jobs:
config
:
test/e2e-v2/cases/log/fluent-bit/e2e.yaml
env
:
ES_VERSION=7.15.0
-
name
:
Trace Profiling BanyanDB
config
:
test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
-
name
:
Trace Profiling H2
config
:
test/e2e-v2/cases/profiling/trace/h2/e2e.yaml
-
name
:
Trace Profiling ES
...
...
@@ -405,6 +409,8 @@ jobs:
-
name
:
Trace Profiling MySQL
config
:
test/e2e-v2/cases/profiling/trace/mysql/e2e.yaml
-
name
:
eBPF Profiling BanyanDB
config
:
test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml
-
name
:
eBPF Profiling H2
config
:
test/e2e-v2/cases/profiling/ebpf/h2/e2e.yaml
-
name
:
eBPF Profiling ES
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/cache/ProfileTaskCache.java
浏览文件 @
25ebd6c2
...
...
@@ -121,13 +121,13 @@ public class ProfileTaskCache implements Service {
* use for every db query
*/
public
long
getCacheStartTimeBucket
()
{
return
TimeBucket
.
get
Record
TimeBucket
(
System
.
currentTimeMillis
());
return
TimeBucket
.
get
Minute
TimeBucket
(
System
.
currentTimeMillis
());
}
/**
* use for every db query, +10 start time and +15 end time(because use task end time to search)
*/
public
long
getCacheEndTimeBucket
()
{
return
TimeBucket
.
get
Record
TimeBucket
(
System
.
currentTimeMillis
()
+
TimeUnit
.
MINUTES
.
toMillis
(
25
));
return
TimeBucket
.
get
Minute
TimeBucket
(
System
.
currentTimeMillis
()
+
TimeUnit
.
MINUTES
.
toMillis
(
25
));
}
}
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/profiling/trace/ProfileTaskMutationService.java
浏览文件 @
25ebd6c2
...
...
@@ -24,7 +24,6 @@ import java.util.concurrent.TimeUnit;
import
lombok.RequiredArgsConstructor
;
import
org.apache.skywalking.oap.server.network.constants.ProfileConstants
;
import
org.apache.skywalking.oap.server.library.util.StringUtil
;
import
org.apache.skywalking.oap.server.core.analysis.DownSampling
;
import
org.apache.skywalking.oap.server.core.analysis.TimeBucket
;
import
org.apache.skywalking.oap.server.core.analysis.worker.NoneStreamProcessor
;
import
org.apache.skywalking.oap.server.core.query.type.ProfileTaskCreationResult
;
...
...
@@ -93,7 +92,7 @@ public class ProfileTaskMutationService implements Service {
task
.
setDumpPeriod
(
dumpPeriod
);
task
.
setCreateTime
(
createTime
);
task
.
setMaxSamplingCount
(
maxSamplingCount
);
task
.
setTimeBucket
(
TimeBucket
.
get
RecordTimeBucket
(
taskEnd
Time
));
task
.
setTimeBucket
(
TimeBucket
.
get
MinuteTimeBucket
(
taskStart
Time
));
NoneStreamProcessor
.
getInstance
().
in
(
task
);
return
ProfileTaskCreationResult
.
builder
().
id
(
task
.
id
()).
build
();
...
...
@@ -138,8 +137,8 @@ public class ProfileTaskMutationService implements Service {
}
// Each service can monitor up to 1 endpoints during the execution of tasks
long
startTimeBucket
=
TimeBucket
.
get
TimeBucket
(
monitorStartTime
,
DownSampling
.
Second
);
long
endTimeBucket
=
TimeBucket
.
get
TimeBucket
(
monitorEndTime
,
DownSampling
.
Second
);
long
startTimeBucket
=
TimeBucket
.
get
MinuteTimeBucket
(
monitorStartTime
);
long
endTimeBucket
=
TimeBucket
.
get
MinuteTimeBucket
(
monitorEndTime
);
final
List
<
ProfileTask
>
alreadyHaveTaskList
=
getProfileTaskDAO
().
getTaskList
(
serviceId
,
null
,
startTimeBucket
,
endTimeBucket
,
1
);
if
(
CollectionUtils
.
isNotEmpty
(
alreadyHaveTaskList
))
{
...
...
oap-server/server-starter/src/main/resources/application.yml
浏览文件 @
25ebd6c2
...
...
@@ -240,7 +240,7 @@ storage:
maxBulkSize
:
${SW_STORAGE_BANYANDB_MAX_BULK_SIZE:5000}
flushInterval
:
${SW_STORAGE_BANYANDB_FLUSH_INTERVAL:15}
concurrentWriteThreads
:
${SW_STORAGE_BANYANDB_CONCURRENT_WRITE_THREADS:15}
fetchTaskLogMaxSize
:
${SW_STORAGE_BANYANDB_FETCH_TASK_LOG_MAX_SIZE:1000}
# the max number of fetch task log
in a request
profileTaskQueryMaxSize
:
${SW_STORAGE_BANYANDB_PROFILE_TASK_QUERY_MAX_SIZE:200}
# the max number of fetch task
in a request
agent-analyzer
:
selector
:
${SW_AGENT_ANALYZER:default}
...
...
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageConfig.java
浏览文件 @
25ebd6c2
...
...
@@ -44,8 +44,8 @@ public class BanyanDBStorageConfig extends ModuleConfig {
*/
private
int
concurrentWriteThreads
=
2
;
/**
* Max size of {@link org.apache.skywalking.oap.server.core.query.type.ProfileTask
Log
} to be fetched
* Max size of {@link org.apache.skywalking.oap.server.core.query.type.ProfileTask} to be fetched
* in a single request.
*/
private
int
fetchTaskLogMaxSize
;
private
int
profileTaskQueryMaxSize
=
200
;
}
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/BanyanDBStorageProvider.java
浏览文件 @
25ebd6c2
...
...
@@ -113,9 +113,9 @@ public class BanyanDBStorageProvider extends ModuleProvider {
this
.
registerServiceImplementation
(
IMetadataQueryDAO
.
class
,
new
BanyanDBMetadataQueryDAO
(
client
));
this
.
registerServiceImplementation
(
IAlarmQueryDAO
.
class
,
new
BanyanDBAlarmQueryDAO
(
client
));
this
.
registerServiceImplementation
(
ILogQueryDAO
.
class
,
new
BanyanDBLogQueryDAO
(
client
));
this
.
registerServiceImplementation
(
IProfileTaskQueryDAO
.
class
,
new
BanyanDBProfileTaskQueryDAO
(
client
));
this
.
registerServiceImplementation
(
IProfileTaskLogQueryDAO
.
class
,
new
BanyanDBProfileTaskLogQueryDAO
(
client
,
this
.
config
.
get
FetchTaskLog
MaxSize
()));
this
.
registerServiceImplementation
(
IProfileThreadSnapshotQueryDAO
.
class
,
new
BanyanDBProfileThreadSnapshotQueryDAO
(
client
));
this
.
registerServiceImplementation
(
IProfileTaskQueryDAO
.
class
,
new
BanyanDBProfileTaskQueryDAO
(
client
,
this
.
config
.
getProfileTaskQueryMaxSize
()
));
this
.
registerServiceImplementation
(
IProfileTaskLogQueryDAO
.
class
,
new
BanyanDBProfileTaskLogQueryDAO
(
client
,
this
.
config
.
get
ProfileTaskQuery
MaxSize
()));
this
.
registerServiceImplementation
(
IProfileThreadSnapshotQueryDAO
.
class
,
new
BanyanDBProfileThreadSnapshotQueryDAO
(
client
,
this
.
config
.
getProfileTaskQueryMaxSize
()
));
this
.
registerServiceImplementation
(
UITemplateManagementDAO
.
class
,
new
BanyanDBUITemplateManagementDAO
(
client
));
this
.
registerServiceImplementation
(
IEventQueryDAO
.
class
,
new
BanyanDBEventQueryDAO
(
client
));
this
.
registerServiceImplementation
(
ITopologyQueryDAO
.
class
,
new
BanyanDBTopologyQueryDAO
(
client
));
...
...
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/measure/BanyanDBTopologyQueryDAO.java
浏览文件 @
25ebd6c2
...
...
@@ -28,6 +28,7 @@ import org.apache.skywalking.oap.server.core.analysis.manual.relation.endpoint.E
import
org.apache.skywalking.oap.server.core.analysis.manual.relation.instance.ServiceInstanceRelationServerSideMetrics
;
import
org.apache.skywalking.oap.server.core.analysis.manual.relation.service.ServiceRelationClientSideMetrics
;
import
org.apache.skywalking.oap.server.core.analysis.manual.relation.service.ServiceRelationServerSideMetrics
;
import
org.apache.skywalking.oap.server.core.analysis.metrics.Metrics
;
import
org.apache.skywalking.oap.server.core.query.type.Call
;
import
org.apache.skywalking.oap.server.core.source.DetectPoint
;
import
org.apache.skywalking.oap.server.core.storage.query.ITopologyQueryDAO
;
...
...
@@ -106,19 +107,21 @@ public class BanyanDBTopologyQueryDAO extends AbstractBanyanDBDAO implements ITo
if
(
startTB
>
0
&&
endTB
>
0
)
{
timestampRange
=
new
TimestampRange
(
TimeBucket
.
getTimestamp
(
startTB
),
TimeBucket
.
getTimestamp
(
endTB
));
}
final
String
modelName
=
detectPoint
==
DetectPoint
.
SERVER
?
ServiceRelationServerSideMetrics
.
INDEX_NAME
:
ServiceRelationClientSideMetrics
.
INDEX_NAME
;
final
Map
<
String
,
Call
.
CallDetail
>
callMap
=
new
HashMap
<>();
for
(
final
QueryBuilder
<
MeasureQuery
>
q
:
queryBuilderList
)
{
MeasureQueryResponse
resp
=
query
(
ServiceRelationClientSideMetrics
.
INDEX_NAME
,
MeasureQueryResponse
resp
=
query
(
modelName
,
ImmutableSet
.
of
(
ServiceRelationClientSideMetrics
.
COMPONENT_ID
,
ServiceRelationClientSideMetrics
.
SOURCE_SERVICE_ID
,
ServiceRelationClientSideMetrics
.
DEST_SERVICE_ID
,
ServiceRelationClientSide
Metrics
.
ENTITY_ID
),
Metrics
.
ENTITY_ID
),
Collections
.
emptySet
(),
timestampRange
,
q
);
if
(
resp
.
size
()
==
0
)
{
continue
;
}
final
Call
.
CallDetail
call
=
new
Call
.
CallDetail
();
final
String
entityId
=
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
ServiceRelationClientSide
Metrics
.
ENTITY_ID
);
final
String
entityId
=
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
Metrics
.
ENTITY_ID
);
final
int
componentId
=
((
Number
)
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
ServiceRelationClientSideMetrics
.
COMPONENT_ID
)).
intValue
();
call
.
buildFromServiceRelation
(
entityId
,
componentId
,
detectPoint
);
callMap
.
putIfAbsent
(
entityId
,
call
);
...
...
@@ -163,19 +166,21 @@ public class BanyanDBTopologyQueryDAO extends AbstractBanyanDBDAO implements ITo
if
(
startTB
>
0
&&
endTB
>
0
)
{
timestampRange
=
new
TimestampRange
(
TimeBucket
.
getTimestamp
(
startTB
),
TimeBucket
.
getTimestamp
(
endTB
));
}
final
String
modelName
=
detectPoint
==
DetectPoint
.
SERVER
?
ServiceInstanceRelationServerSideMetrics
.
INDEX_NAME
:
ServiceRelationClientSideMetrics
.
INDEX_NAME
;
final
Map
<
String
,
Call
.
CallDetail
>
callMap
=
new
HashMap
<>();
for
(
final
QueryBuilder
<
MeasureQuery
>
q
:
queryBuilderList
)
{
MeasureQueryResponse
resp
=
query
(
ServiceInstanceRelationServerSideMetrics
.
INDEX_NAME
,
MeasureQueryResponse
resp
=
query
(
modelName
,
ImmutableSet
.
of
(
ServiceInstanceRelationServerSideMetrics
.
COMPONENT_ID
,
ServiceInstanceRelationServerSideMetrics
.
SOURCE_SERVICE_ID
,
ServiceInstanceRelationServerSideMetrics
.
DEST_SERVICE_ID
,
ServiceInstanceRelationServerSide
Metrics
.
ENTITY_ID
),
Metrics
.
ENTITY_ID
),
Collections
.
emptySet
(),
timestampRange
,
q
);
if
(
resp
.
size
()
==
0
)
{
continue
;
}
final
Call
.
CallDetail
call
=
new
Call
.
CallDetail
();
final
String
entityId
=
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
ServiceInstanceRelationServerSide
Metrics
.
ENTITY_ID
);
final
String
entityId
=
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
Metrics
.
ENTITY_ID
);
final
int
componentId
=
((
Number
)
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
ServiceRelationClientSideMetrics
.
COMPONENT_ID
)).
intValue
();
call
.
buildFromInstanceRelation
(
entityId
,
componentId
,
detectPoint
);
callMap
.
putIfAbsent
(
entityId
,
call
);
...
...
@@ -217,13 +222,13 @@ public class BanyanDBTopologyQueryDAO extends AbstractBanyanDBDAO implements ITo
MeasureQueryResponse
resp
=
query
(
EndpointRelationServerSideMetrics
.
INDEX_NAME
,
ImmutableSet
.
of
(
EndpointRelationServerSideMetrics
.
DEST_ENDPOINT
,
EndpointRelationServerSideMetrics
.
SOURCE_ENDPOINT
,
EndpointRelationServerSide
Metrics
.
ENTITY_ID
),
Metrics
.
ENTITY_ID
),
Collections
.
emptySet
(),
timestampRange
,
q
);
if
(
resp
.
size
()
==
0
)
{
continue
;
}
final
Call
.
CallDetail
call
=
new
Call
.
CallDetail
();
final
String
entityId
=
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
EndpointRelationServerSide
Metrics
.
ENTITY_ID
);
final
String
entityId
=
resp
.
getDataPoints
().
get
(
0
).
getTagValue
(
Metrics
.
ENTITY_ID
);
call
.
buildFromEndpointRelation
(
entityId
,
detectPoint
);
callMap
.
putIfAbsent
(
entityId
,
call
);
}
...
...
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/BanyanDBProfileTaskLogQueryDAO.java
浏览文件 @
25ebd6c2
...
...
@@ -29,7 +29,6 @@ import org.apache.skywalking.oap.server.core.storage.profiling.trace.IProfileTas
import
org.apache.skywalking.oap.server.storage.plugin.banyandb.BanyanDBStorageClient
;
import
java.io.IOException
;
import
java.util.Collections
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -43,9 +42,10 @@ public class BanyanDBProfileTaskLogQueryDAO extends AbstractBanyanDBDAO implemen
private
final
int
queryMaxSize
;
public
BanyanDBProfileTaskLogQueryDAO
(
BanyanDBStorageClient
client
,
int
q
ueryMaxSize
)
{
public
BanyanDBProfileTaskLogQueryDAO
(
BanyanDBStorageClient
client
,
int
profileTaskQ
ueryMaxSize
)
{
super
(
client
);
this
.
queryMaxSize
=
queryMaxSize
;
// query log size use profile task query max size * per log count
this
.
queryMaxSize
=
profileTaskQueryMaxSize
*
50
;
}
@Override
...
...
@@ -58,10 +58,6 @@ public class BanyanDBProfileTaskLogQueryDAO extends AbstractBanyanDBDAO implemen
}
});
if
(
resp
.
size
()
==
0
)
{
return
Collections
.
emptyList
();
}
final
LinkedList
<
ProfileTaskLog
>
tasks
=
new
LinkedList
<>();
for
(
final
RowEntity
rowEntity
:
resp
.
getElements
())
{
tasks
.
add
(
buildProfileTaskLog
(
rowEntity
));
...
...
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/BanyanDBProfileTaskQueryDAO.java
浏览文件 @
25ebd6c2
...
...
@@ -19,9 +19,11 @@
package
org.apache.skywalking.oap.server.storage.plugin.banyandb.stream
;
import
com.google.common.collect.ImmutableSet
;
import
org.apache.skywalking.banyandb.v1.client.AbstractQuery
;
import
org.apache.skywalking.banyandb.v1.client.RowEntity
;
import
org.apache.skywalking.banyandb.v1.client.StreamQuery
;
import
org.apache.skywalking.banyandb.v1.client.StreamQueryResponse
;
import
org.apache.skywalking.oap.server.core.analysis.metrics.Metrics
;
import
org.apache.skywalking.oap.server.core.profiling.trace.ProfileTaskRecord
;
import
org.apache.skywalking.oap.server.core.query.type.ProfileTask
;
import
org.apache.skywalking.oap.server.core.storage.profiling.trace.IProfileTaskQueryDAO
;
...
...
@@ -43,11 +45,15 @@ public class BanyanDBProfileTaskQueryDAO extends AbstractBanyanDBDAO implements
ProfileTaskRecord
.
DURATION
,
ProfileTaskRecord
.
MIN_DURATION_THRESHOLD
,
ProfileTaskRecord
.
DUMP_PERIOD
,
ProfileTaskRecord
.
MAX_SAMPLING_COUNT
ProfileTaskRecord
.
MAX_SAMPLING_COUNT
,
Metrics
.
TIME_BUCKET
);
public
BanyanDBProfileTaskQueryDAO
(
BanyanDBStorageClient
client
)
{
private
final
int
queryMaxSize
;
public
BanyanDBProfileTaskQueryDAO
(
BanyanDBStorageClient
client
,
int
queryMaxSize
)
{
super
(
client
);
this
.
queryMaxSize
=
queryMaxSize
;
}
@Override
...
...
@@ -63,14 +69,17 @@ public class BanyanDBProfileTaskQueryDAO extends AbstractBanyanDBDAO implements
query
.
and
(
eq
(
ProfileTaskRecord
.
ENDPOINT_NAME
,
endpointName
));
}
if
(
startTimeBucket
!=
null
)
{
query
.
and
(
gte
(
ProfileTaskRecord
.
TIME_BUCKET
,
startTimeBucket
));
query
.
and
(
gte
(
Metrics
.
TIME_BUCKET
,
startTimeBucket
));
}
if
(
endTimeBucket
!=
null
)
{
query
.
and
(
lte
(
ProfileTaskRecord
.
TIME_BUCKET
,
endTimeBucket
));
query
.
and
(
lte
(
Metrics
.
TIME_BUCKET
,
endTimeBucket
));
}
if
(
limit
!=
null
)
{
query
.
setLimit
(
limit
);
}
else
{
query
.
setLimit
(
BanyanDBProfileTaskQueryDAO
.
this
.
queryMaxSize
);
}
query
.
setOrderBy
(
new
AbstractQuery
.
OrderBy
(
ProfileTaskRecord
.
START_TIME
,
AbstractQuery
.
Sort
.
DESC
));
}
});
...
...
oap-server/server-storage-plugin/storage-banyandb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/banyandb/stream/BanyanDBProfileThreadSnapshotQueryDAO.java
浏览文件 @
25ebd6c2
...
...
@@ -73,11 +73,14 @@ public class BanyanDBProfileThreadSnapshotQueryDAO extends AbstractBanyanDBDAO i
SegmentRecord
.
TIME_BUCKET
,
SegmentRecord
.
DATA_BINARY
);
private
final
int
querySegmentMaxSize
;
protected
final
ProfileThreadSnapshotRecord
.
Builder
builder
=
new
ProfileThreadSnapshotRecord
.
Builder
();
public
BanyanDBProfileThreadSnapshotQueryDAO
(
BanyanDBStorageClient
client
)
{
public
BanyanDBProfileThreadSnapshotQueryDAO
(
BanyanDBStorageClient
client
,
int
profileTaskQueryMaxSize
)
{
super
(
client
);
this
.
querySegmentMaxSize
=
profileTaskQueryMaxSize
;
}
@Override
...
...
@@ -89,6 +92,7 @@ public class BanyanDBProfileThreadSnapshotQueryDAO extends AbstractBanyanDBDAO i
public
void
apply
(
StreamQuery
query
)
{
query
.
and
(
eq
(
ProfileThreadSnapshotRecord
.
TASK_ID
,
taskId
))
.
and
(
eq
(
ProfileThreadSnapshotRecord
.
SEQUENCE
,
0L
));
query
.
setLimit
(
querySegmentMaxSize
);
}
});
...
...
test/e2e-v2/cases/profiling/ebpf/banyandb/docker-compose.yml
0 → 100644
浏览文件 @
25ebd6c2
# 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.
version
:
'
2.1'
services
:
banyandb
:
image
:
"
ghcr.io/apache/skywalking-banyandb:${SW_BANYANDB_COMMIT}"
networks
:
-
e2e
expose
:
-
17912
command
:
standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-nz
127.0.0.1
17912"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../docker-compose.yml
service
:
oap
networks
:
-
e2e
environment
:
SW_STORAGE
:
banyandb
SW_STORAGE_BANYANDB_HOST
:
"
banyandb"
depends_on
:
banyandb
:
condition
:
service_healthy
ports
:
-
12800
sqrt
:
extends
:
file
:
../docker-compose.yml
service
:
sqrt
networks
:
-
e2e
rover
:
extends
:
file
:
../docker-compose.yml
service
:
rover
networks
:
-
e2e
depends_on
:
oap
:
condition
:
service_healthy
networks
:
e2e
:
\ No newline at end of file
test/e2e-v2/cases/profiling/ebpf/banyandb/e2e.yaml
0 → 100644
浏览文件 @
25ebd6c2
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
20m
init-system-environment
:
../../../../script/env
steps
:
-
name
:
set PATH
command
:
export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
verify
:
retry
:
count
:
20
interval
:
10s
cases
:
-
includes
:
-
../profiling-cases.yaml
\ No newline at end of file
test/e2e-v2/cases/profiling/trace/banyandb/docker-compose.yml
0 → 100644
浏览文件 @
25ebd6c2
# 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.
version
:
'
3.8'
services
:
banyandb
:
image
:
"
ghcr.io/apache/skywalking-banyandb:${SW_BANYANDB_COMMIT}"
networks
:
-
e2e
expose
:
-
17912
command
:
standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-nz
127.0.0.1
17912"
]
interval
:
5s
timeout
:
60s
retries
:
120
provider
:
extends
:
file
:
../../../../script/docker-compose/base-compose.yml
service
:
provider
depends_on
:
oap
:
condition
:
service_healthy
ports
:
-
9090
oap
:
extends
:
file
:
../../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
banyandb
SW_STORAGE_BANYANDB_HOST
:
"
banyandb"
depends_on
:
banyandb
:
condition
:
service_healthy
ports
:
-
12800
networks
:
e2e
:
test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
0 → 100644
浏览文件 @
25ebd6c2
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
20m
init-system-environment
:
../../../../script/env
steps
:
-
name
:
set PATH
command
:
export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
verify
:
retry
:
count
:
20
interval
:
3s
cases
:
-
includes
:
-
../profiling-cases.yaml
test/e2e-v2/cases/storage/banyandb/docker-compose.yml
0 → 100644
浏览文件 @
25ebd6c2
# 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.
version
:
'
2.1'
services
:
banyandb
:
image
:
"
ghcr.io/apache/skywalking-banyandb:${SW_BANYANDB_COMMIT}"
networks
:
-
e2e
expose
:
-
17912
command
:
standalone --stream-root-path /tmp/stream-data --measure-root-path /tmp/measure-data
healthcheck
:
test
:
[
"
CMD"
,
"
sh"
,
"
-c"
,
"
nc
-nz
127.0.0.1
17912"
]
interval
:
5s
timeout
:
60s
retries
:
120
oap
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
oap
environment
:
SW_STORAGE
:
banyandb
SW_STORAGE_BANYANDB_HOST
:
"
banyandb"
ports
:
-
12800
depends_on
:
banyandb
:
condition
:
service_healthy
provider
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
provider
ports
:
-
9090
networks
:
-
e2e
depends_on
:
oap
:
condition
:
service_healthy
consumer
:
extends
:
file
:
../../../script/docker-compose/base-compose.yml
service
:
consumer
ports
:
-
9092
depends_on
:
oap
:
condition
:
service_healthy
provider
:
condition
:
service_healthy
networks
:
e2e
:
test/e2e-v2/cases/storage/banyandb/e2e.yaml
0 → 100644
浏览文件 @
25ebd6c2
# 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.
# This file is used to show how to write configuration files and can be used to test.
setup
:
env
:
compose
file
:
docker-compose.yml
timeout
:
20m
init-system-environment
:
../../../script/env
steps
:
-
name
:
set PATH
command
:
export PATH=/tmp/skywalking-infra-e2e/bin:$PATH
-
name
:
install yq
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq
-
name
:
install swctl
command
:
bash test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl
trigger
:
action
:
http
interval
:
3s
times
:
10
url
:
http://${consumer_host}:${consumer_9092}/info
method
:
POST
verify
:
# verify with retry strategy
retry
:
# max retry count
count
:
20
# the interval between two retries, in millisecond.
interval
:
10s
cases
:
-
includes
:
-
../storage-cases.yaml
test/e2e-v2/script/env
浏览文件 @
25ebd6c2
...
...
@@ -23,5 +23,6 @@ SW_AGENT_CLIENT_JS_COMMIT=af0565a67d382b683c1dbd94c379b7080db61449
SW_AGENT_CLIENT_JS_TEST_COMMIT=4f1eb1dcdbde3ec4a38534bf01dded4ab5d2f016
SW_KUBERNETES_COMMIT_SHA=0f3ec68e5a7e1608cec8688716b848ed15e971e5
SW_ROVER_COMMIT=90c93c706743aac1f5853b677730edae8cc32a2c
SW_BANYANDB_COMMIT=f868a5dcd881c21dbf044013228994f49f15bd83
SW_CTL_COMMIT=219876daf985fd474955834ef0b65013f0890e96
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录