Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 136 additions & 136 deletions docs/en/setup/backend/configuration-vocabulary.md

Large diffs are not rendered by default.

224 changes: 112 additions & 112 deletions docs/en/setup/backend/storages/banyandb.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@ enum AnalyzerType {
@Retention(RetentionPolicy.RUNTIME)
@interface Group {
/**
* Specify the group name for the Stream (Record). The default value is "recordsNormal".
* Specify the group name for the Stream (Record). The default value is "records".
*/
StreamGroup streamGroup() default StreamGroup.RECORDS_NORMAL;
StreamGroup streamGroup() default StreamGroup.RECORDS;
}

enum StreamGroup {
RECORDS_NORMAL("recordsNormal"),
RECORDS("records"),
RECORDS_TRACE("recordsTrace"),
RECORDS_ZIPKIN_TRACE("recordsZipkinTrace"),
RECORDS_LOG("recordsLog"),
Expand All @@ -309,7 +309,7 @@ enum StreamGroup {
}

enum MeasureGroup {
METRICS_MIN("metricsMin"),
METRICS_MINUTE("metricsMinute"),
METRICS_HOUR("metricsHour"),
METRICS_DAY("metricsDay"),
METADATA("metadata");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ public static class TopN {

@Setter
@Getter
private BanyanDB.StreamGroup streamGroup = BanyanDB.StreamGroup.RECORDS_NORMAL;
private BanyanDB.StreamGroup streamGroup = BanyanDB.StreamGroup.RECORDS;
}
224 changes: 112 additions & 112 deletions oap-server/server-starter/src/main/resources/bydb.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public BanyanDBStorageConfig loadConfig() throws ModuleStartException {
moduleProvider.name()
);
Properties groups = configProperties.get("groups");
Properties recordsNormal = (Properties) groups.get("recordsNormal");
Properties recordsNormal = (Properties) groups.get(BanyanDB.StreamGroup.RECORDS.getName());
copyProperties(
config.getRecordsNormal(), recordsNormal,
moduleProvider.getModule().name(), moduleProvider.name()
Expand Down Expand Up @@ -105,7 +105,7 @@ public BanyanDBStorageConfig loadConfig() throws ModuleStartException {
);
copyStages(browserErrorLog, config.getRecordsBrowserErrorLog());

Properties metricsMin = (Properties) groups.get(BanyanDB.MeasureGroup.METRICS_MIN.getName());
Properties metricsMin = (Properties) groups.get(BanyanDB.MeasureGroup.METRICS_MINUTE.getName());
copyProperties(
config.getMetricsMin(), metricsMin,
moduleProvider.getModule().name(), moduleProvider.name()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
@Getter
@Setter
public class BanyanDBStorageConfig extends ModuleConfig {

public static final String PROPERTY_GROUP_NAME = "property";

private Global global = new Global();
private RecordsNormal recordsNormal = new RecordsNormal();
private RecordsTrace recordsTrace = new RecordsTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.skywalking.banyandb.v1.client.TagAndValue;
import org.apache.skywalking.banyandb.property.v1.BanyandbProperty.Property;
import org.apache.skywalking.oap.server.core.management.ui.menu.UIMenu;
import org.apache.skywalking.oap.server.core.storage.annotation.BanyanDB;
import org.apache.skywalking.oap.server.core.storage.management.UIMenuManagementDAO;
import org.apache.skywalking.oap.server.storage.plugin.banyandb.stream.AbstractBanyanDBDAO;

Expand All @@ -38,7 +39,7 @@ public BanyanDBUIMenuManagementDAO(BanyanDBStorageClient client) {

@Override
public UIMenu getMenu(String id) throws IOException {
Property p = getClient().queryProperty(BanyanDBStorageConfig.PROPERTY_GROUP_NAME, UIMenu.INDEX_NAME, id);
Property p = getClient().queryProperty(BanyanDB.PropertyGroup.PROPERTY.getName(), UIMenu.INDEX_NAME, id);
if (p == null) {
return null;
}
Expand All @@ -49,7 +50,7 @@ public UIMenu getMenu(String id) throws IOException {
public void saveMenu(UIMenu menu) throws IOException {
Property property = Property.newBuilder()
.setMetadata(
BanyandbCommon.Metadata.newBuilder().setGroup(BanyanDBStorageConfig.PROPERTY_GROUP_NAME).setName(UIMenu.INDEX_NAME))
BanyandbCommon.Metadata.newBuilder().setGroup(BanyanDB.PropertyGroup.PROPERTY.getName()).setName(UIMenu.INDEX_NAME))
.setId(menu.getMenuId())
.addTags(TagAndValue.newStringTag(UIMenu.CONFIGURATION, menu.getConfigurationJson())
.build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.skywalking.oap.server.core.query.input.DashboardSetting;
import org.apache.skywalking.oap.server.core.query.type.DashboardConfiguration;
import org.apache.skywalking.oap.server.core.query.type.TemplateChangeStatus;
import org.apache.skywalking.oap.server.core.storage.annotation.BanyanDB;
import org.apache.skywalking.oap.server.core.storage.management.UITemplateManagementDAO;
import org.apache.skywalking.oap.server.storage.plugin.banyandb.stream.AbstractBanyanDBDAO;

Expand All @@ -43,7 +44,7 @@ public BanyanDBUITemplateManagementDAO(BanyanDBStorageClient client) {

@Override
public DashboardConfiguration getTemplate(String id) throws IOException {
Property p = getClient().queryProperty(BanyanDBStorageConfig.PROPERTY_GROUP_NAME, UITemplate.INDEX_NAME, id);
Property p = getClient().queryProperty(BanyanDB.PropertyGroup.PROPERTY.getName(), UITemplate.INDEX_NAME, id);
if (p == null) {
return null;
}
Expand All @@ -52,7 +53,7 @@ public DashboardConfiguration getTemplate(String id) throws IOException {

@Override
public List<DashboardConfiguration> getAllTemplates(Boolean includingDisabled) throws IOException {
List<Property> propertyList = getClient().listProperties(BanyanDBStorageConfig.PROPERTY_GROUP_NAME, UITemplate.INDEX_NAME);
List<Property> propertyList = getClient().listProperties(BanyanDB.PropertyGroup.PROPERTY.getName(), UITemplate.INDEX_NAME);
return propertyList.stream().map(p -> fromEntity(parse(p)))
.filter(conf -> includingDisabled || !conf.isDisabled())
.collect(Collectors.toList());
Expand Down Expand Up @@ -92,7 +93,7 @@ public TemplateChangeStatus changeTemplate(DashboardSetting setting) {

@Override
public TemplateChangeStatus disableTemplate(String id) throws IOException {
Property oldProperty = this.getClient().queryProperty(BanyanDBStorageConfig.PROPERTY_GROUP_NAME, UITemplate.INDEX_NAME, id);
Property oldProperty = this.getClient().queryProperty(BanyanDB.PropertyGroup.PROPERTY.getName(), UITemplate.INDEX_NAME, id);
if (oldProperty == null) {
return TemplateChangeStatus.builder().status(false).id(id).message("Can't find the template")
.build();
Expand Down Expand Up @@ -137,7 +138,7 @@ public UITemplate parse(Property property) {
public Property applyAll(UITemplate uiTemplate) {
return Property.newBuilder()
.setMetadata(BanyandbCommon.Metadata.newBuilder()
.setGroup(BanyanDBStorageConfig.PROPERTY_GROUP_NAME)
.setGroup(BanyanDB.PropertyGroup.PROPERTY.getName())
.setName(UITemplate.INDEX_NAME))
.setId(uiTemplate.id().build())
.addTags(TagAndValue.newStringTag(UITemplate.CONFIGURATION, uiTemplate.getConfiguration()).build())
Expand All @@ -155,7 +156,7 @@ public Property applyAll(UITemplate uiTemplate) {
public Property applyStatus(UITemplate uiTemplate) {
return Property.newBuilder()
.setMetadata(BanyandbCommon.Metadata.newBuilder()
.setGroup(BanyanDBStorageConfig.PROPERTY_GROUP_NAME)
.setGroup(BanyanDB.PropertyGroup.PROPERTY.getName())
.setName(UITemplate.INDEX_NAME))
.setId(uiTemplate.id().build())
.addTags(TagAndValue.newLongTag(UITemplate.DISABLED, uiTemplate.getDisabled()).build())
Expand All @@ -172,7 +173,7 @@ public Property applyStatus(UITemplate uiTemplate) {
public Property applyConfiguration(UITemplate uiTemplate) {
return Property.newBuilder()
.setMetadata(BanyandbCommon.Metadata.newBuilder()
.setGroup(BanyanDBStorageConfig.PROPERTY_GROUP_NAME)
.setGroup(BanyanDB.PropertyGroup.PROPERTY.getName())
.setName(UITemplate.INDEX_NAME))
.setId(uiTemplate.id().build())
.addTags(TagAndValue.newStringTag(UITemplate.CONFIGURATION, uiTemplate.getConfiguration()).build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ private TagSpec parseTagSpec(ModelColumn modelColumn) {

public SchemaMetadata parseMetadata(Model model, BanyanDBStorageConfig config, DownSamplingConfigService configService) {
if (!model.isTimeSeries()) {
return new SchemaMetadata(BanyanDBStorageConfig.PROPERTY_GROUP_NAME, model.getName(), Kind.PROPERTY, DownSampling.None, config.getProperty());
return new SchemaMetadata(BanyanDB.PropertyGroup.PROPERTY.getName(), model.getName(), Kind.PROPERTY, DownSampling.None, config.getProperty());
}
if (model.isRecord()) { // stream
BanyanDB.StreamGroup streamGroup = model.getBanyanDBModelExtension().getStreamGroup();
Expand Down Expand Up @@ -523,8 +523,8 @@ public SchemaMetadata parseMetadata(Model model, BanyanDBStorageConfig config, D
Kind.STREAM,
model.getDownsampling(),
config.getRecordsBrowserErrorLog());
case RECORDS_NORMAL:
return new SchemaMetadata(BanyanDB.StreamGroup.RECORDS_NORMAL.getName(),
case RECORDS:
return new SchemaMetadata(BanyanDB.StreamGroup.RECORDS.getName(),
model.getName(),
Kind.STREAM,
model.getDownsampling(),
Expand All @@ -543,7 +543,7 @@ public SchemaMetadata parseMetadata(Model model, BanyanDBStorageConfig config, D

switch (model.getDownsampling()) {
case Minute:
return new SchemaMetadata(BanyanDB.MeasureGroup.METRICS_MIN.getName(),
return new SchemaMetadata(BanyanDB.MeasureGroup.METRICS_MINUTE.getName(),
model.getName(),
Kind.MEASURE,
model.getDownsampling(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import org.apache.skywalking.banyandb.v1.client.TagAndValue;
import org.apache.skywalking.banyandb.property.v1.BanyandbProperty.Property;
import org.apache.skywalking.oap.server.core.profiling.continuous.storage.ContinuousProfilingPolicy;
import org.apache.skywalking.oap.server.core.storage.annotation.BanyanDB;
import org.apache.skywalking.oap.server.core.storage.profiling.continuous.IContinuousProfilingPolicyDAO;
import org.apache.skywalking.oap.server.storage.plugin.banyandb.BanyanDBStorageClient;
import org.apache.skywalking.oap.server.storage.plugin.banyandb.BanyanDBStorageConfig;

import java.io.IOException;
import java.util.List;
Expand All @@ -52,7 +52,7 @@ public void savePolicy(ContinuousProfilingPolicy policy) throws IOException {
public Property applyAll(ContinuousProfilingPolicy policy) {
return Property.newBuilder()
.setMetadata(BanyandbCommon.Metadata.newBuilder()
.setGroup(BanyanDBStorageConfig.PROPERTY_GROUP_NAME)
.setGroup(BanyanDB.PropertyGroup.PROPERTY.getName())
.setName(ContinuousProfilingPolicy.INDEX_NAME))
.setId(policy.id().build())
.addTags(TagAndValue.newStringTag(ContinuousProfilingPolicy.UUID, policy.getUuid()).build())
Expand All @@ -64,7 +64,7 @@ public Property applyAll(ContinuousProfilingPolicy policy) {
public List<ContinuousProfilingPolicy> queryPolicies(List<String> serviceIdList) throws IOException {
return serviceIdList.stream().map(s -> {
try {
return getClient().queryProperty(BanyanDBStorageConfig.PROPERTY_GROUP_NAME, ContinuousProfilingPolicy.INDEX_NAME, s);
return getClient().queryProperty(BanyanDB.PropertyGroup.PROPERTY.getName(), ContinuousProfilingPolicy.INDEX_NAME, s);
} catch (IOException e) {
log.warn("query policy error", e);
return null;
Expand Down
4 changes: 2 additions & 2 deletions test/e2e-v2/cases/php/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ setup:
trigger:
action: http
interval: 3s
times: 10
times: 20
url: http://${php_host}:${php_8080}/php/info
method: POST

Expand Down Expand Up @@ -66,7 +66,7 @@ verify:
- query: |
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace $( \
swctl --display yaml --base-url=http://${oap_host}:${oap_12800}/graphql trace ls --service-name=php\
| yq e '.traces | select(.[].endpointnames[0]=="POST:/php/info") | .[0].traceids[0]' -
| yq e '.traces | select(.[].endpointnames[0]=="POST:/php/info") | .[9].traceids[0]' -
)
expected: expected/trace-info-detail.yml
# dependency service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ services:
service: oap
environment:
SW_STORAGE: banyandb
SW_STORAGE_BANYANDB_GR_NORMAL_TTL_DAYS: 5
SW_STORAGE_BANYANDB_GR_SUPER_TTL_DAYS: 5
SW_STORAGE_BANYANDB_RECORDS_TTL_DAYS: 5
SW_STORAGE_BANYANDB_TRACE_TTL_DAYS: 5
ports:
- 12800
depends_on:
Expand Down
20 changes: 10 additions & 10 deletions test/e2e-v2/cases/storage/banyandb/stages/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ services:
environment:
SW_STORAGE: banyandb
SW_STORAGE_BANYANDB_TARGETS: "liaison:17912"
SW_STORAGE_BANYANDB_GM_MINUTE_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_GM_MINUTE_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_GM_HOUR_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_GM_HOUR_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_GM_DAY_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_GM_DAY_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_GR_NORMAL_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_GR_NORMAL_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_GR_TRACE_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_GR_TRACE_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_METRICS_MINUTE_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_METRICS_MINUTE_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_METRICS_HOUR_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_METRICS_HOUR_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_METRICS_DAY_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_METRICS_DAY_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_RECORDS_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_RECORDS_ENABLE_COLD_STAGE: "true"
SW_STORAGE_BANYANDB_TRACE_ENABLE_WARM_STAGE: "true"
SW_STORAGE_BANYANDB_TRACE_ENABLE_COLD_STAGE: "true"
ports:
- 12800:12800
- 11800:11800
Expand Down
Loading