You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2024/11/18 04:14:51 UTC
(skywalking-banyandb-java-client) branch index-mode updated (30a5101 -> 7545acf)
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a change to branch index-mode
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-java-client.git
discard 30a5101 Sync API to support the index mode
new 7545acf Sync API to support the index mode
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (30a5101)
\
N -- N -- N refs/heads/index-mode (7545acf)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CHANGES.md | 6 ++++++
1 file changed, 6 insertions(+)
(skywalking-banyandb-java-client) 01/01: Sync API to support the index mode
Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch index-mode
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-java-client.git
commit 7545acf46ed1ebcc5e285715fee010e2aa64edff
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Mon Nov 18 12:12:20 2024 +0800
Sync API to support the index mode
Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
CHANGES.md | 6 ++++
src/main/proto/banyandb/v1/banyandb-database.proto | 3 ++
src/main/proto/banyandb/v1/banyandb-model.proto | 1 -
.../banyandb/v1/client/BanyanDBClientTestCI.java | 2 +-
.../v1/client/ITMeasureMetadataRegistryTest.java | 34 ++++++++++++++++++++++
5 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 4ceb50a..fc5f912 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,12 @@ Changes by Version
==================
Release Notes.
+0.8.0
+
+### Features
+
+* Bump up the API to support the index mode of Measure.
+
0.7.0
------------------
diff --git a/src/main/proto/banyandb/v1/banyandb-database.proto b/src/main/proto/banyandb/v1/banyandb-database.proto
index de642b1..2426849 100644
--- a/src/main/proto/banyandb/v1/banyandb-database.proto
+++ b/src/main/proto/banyandb/v1/banyandb-database.proto
@@ -113,6 +113,9 @@ message Measure {
string interval = 5;
// updated_at indicates when the measure is updated
google.protobuf.Timestamp updated_at = 6;
+ // index_mode specifies whether the data should be stored exclusively in the index,
+ // meaning it will not be stored in the data storage system.
+ bool index_mode = 7;
}
message MeasureAggregateFunction {
diff --git a/src/main/proto/banyandb/v1/banyandb-model.proto b/src/main/proto/banyandb/v1/banyandb-model.proto
index 5b4b2d3..4aa8fbf 100644
--- a/src/main/proto/banyandb/v1/banyandb-model.proto
+++ b/src/main/proto/banyandb/v1/banyandb-model.proto
@@ -23,7 +23,6 @@ package banyandb.model.v1;
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
-import "validate/validate.proto";
message Str {
string value = 1;
diff --git a/src/test/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClientTestCI.java b/src/test/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClientTestCI.java
index c7cdd6c..6c2d23b 100644
--- a/src/test/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClientTestCI.java
+++ b/src/test/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClientTestCI.java
@@ -31,7 +31,7 @@ import java.io.IOException;
public class BanyanDBClientTestCI {
private static final String REGISTRY = "ghcr.io";
private static final String IMAGE_NAME = "apache/skywalking-banyandb";
- private static final String TAG = "9770bf48f9b88574683f56e2a137555cd68066d9";
+ private static final String TAG = "079483262016e8b2ac58c3f115f974d8ad7e9d2e";
private static final String IMAGE = REGISTRY + "/" + IMAGE_NAME + ":" + TAG;
diff --git a/src/test/java/org/apache/skywalking/banyandb/v1/client/ITMeasureMetadataRegistryTest.java b/src/test/java/org/apache/skywalking/banyandb/v1/client/ITMeasureMetadataRegistryTest.java
index 222a5d9..84e72f4 100644
--- a/src/test/java/org/apache/skywalking/banyandb/v1/client/ITMeasureMetadataRegistryTest.java
+++ b/src/test/java/org/apache/skywalking/banyandb/v1/client/ITMeasureMetadataRegistryTest.java
@@ -145,4 +145,38 @@ public class ITMeasureMetadataRegistryTest extends BanyanDBClientTestCI {
EncodingMethod.ENCODING_METHOD_GORILLA));
return builder.build();
}
+
+ @Test
+ public void testIndexMeasureRegistry_createAndGet() throws BanyanDBException {
+ Measure expectedMeasure = buildIndexMeasure();
+ this.client.define(expectedMeasure);
+ Measure actualMeasure = client.findMeasure("sw_metric", "service_traffic");
+ Assert.assertNotNull(actualMeasure);
+ Assert.assertNotNull(actualMeasure.getUpdatedAt());
+ actualMeasure = actualMeasure.toBuilder().clearUpdatedAt().setMetadata(actualMeasure.getMetadata().toBuilder().clearModRevision().clearCreateRevision()).build();
+ Assert.assertEquals(expectedMeasure, actualMeasure);
+ }
+
+ private Measure buildIndexMeasure() {
+ Measure.Builder builder = Measure.newBuilder()
+ .setMetadata(Metadata.newBuilder()
+ .setGroup("sw_metric")
+ .setName("service_traffic"))
+ .setEntity(Entity.newBuilder().addTagNames("id"))
+ .setIndexMode(true)
+ .addTagFamilies(
+ TagFamilySpec.newBuilder()
+ .setName("default")
+ .addTags(
+ TagSpec.newBuilder()
+ .setName("id")
+ .setType(
+ TagType.TAG_TYPE_STRING))
+ .addTags(
+ TagSpec.newBuilder()
+ .setName("service_name")
+ .setType(
+ TagType.TAG_TYPE_STRING)));
+ return builder.build();
+ }
}