File tree Expand file tree Collapse file tree 5 files changed +44
-2
lines changed
test/java/org/apache/skywalking/banyandb/v1/client Expand file tree Collapse file tree 5 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ Changes by Version
22==================
33Release Notes.
44
5+ 0.8.0
6+
7+ ### Features
8+
9+ * Bump up the API to support the index mode of Measure.
10+
5110.7.0
612------------------
713
Original file line number Diff line number Diff line change @@ -113,6 +113,9 @@ message Measure {
113113 string interval = 5 ;
114114 // updated_at indicates when the measure is updated
115115 google.protobuf.Timestamp updated_at = 6 ;
116+ // index_mode specifies whether the data should be stored exclusively in the index,
117+ // meaning it will not be stored in the data storage system.
118+ bool index_mode = 7 ;
116119}
117120
118121message MeasureAggregateFunction {
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ package banyandb.model.v1;
2323
2424import "google/protobuf/timestamp.proto" ;
2525import "google/protobuf/struct.proto" ;
26- import "validate/validate.proto" ;
2726
2827message Str {
2928 string value = 1 ;
Original file line number Diff line number Diff line change 3131public class BanyanDBClientTestCI {
3232 private static final String REGISTRY = "ghcr.io" ;
3333 private static final String IMAGE_NAME = "apache/skywalking-banyandb" ;
34- private static final String TAG = "9770bf48f9b88574683f56e2a137555cd68066d9 " ;
34+ private static final String TAG = "079483262016e8b2ac58c3f115f974d8ad7e9d2e " ;
3535
3636 private static final String IMAGE = REGISTRY + "/" + IMAGE_NAME + ":" + TAG ;
3737
Original file line number Diff line number Diff line change @@ -145,4 +145,38 @@ private Measure buildMeasure() {
145145 EncodingMethod .ENCODING_METHOD_GORILLA ));
146146 return builder .build ();
147147 }
148+
149+ @ Test
150+ public void testIndexMeasureRegistry_createAndGet () throws BanyanDBException {
151+ Measure expectedMeasure = buildIndexMeasure ();
152+ this .client .define (expectedMeasure );
153+ Measure actualMeasure = client .findMeasure ("sw_metric" , "service_traffic" );
154+ Assert .assertNotNull (actualMeasure );
155+ Assert .assertNotNull (actualMeasure .getUpdatedAt ());
156+ actualMeasure = actualMeasure .toBuilder ().clearUpdatedAt ().setMetadata (actualMeasure .getMetadata ().toBuilder ().clearModRevision ().clearCreateRevision ()).build ();
157+ Assert .assertEquals (expectedMeasure , actualMeasure );
158+ }
159+
160+ private Measure buildIndexMeasure () {
161+ Measure .Builder builder = Measure .newBuilder ()
162+ .setMetadata (Metadata .newBuilder ()
163+ .setGroup ("sw_metric" )
164+ .setName ("service_traffic" ))
165+ .setEntity (Entity .newBuilder ().addTagNames ("id" ))
166+ .setIndexMode (true )
167+ .addTagFamilies (
168+ TagFamilySpec .newBuilder ()
169+ .setName ("default" )
170+ .addTags (
171+ TagSpec .newBuilder ()
172+ .setName ("id" )
173+ .setType (
174+ TagType .TAG_TYPE_STRING ))
175+ .addTags (
176+ TagSpec .newBuilder ()
177+ .setName ("service_name" )
178+ .setType (
179+ TagType .TAG_TYPE_STRING )));
180+ return builder .build ();
181+ }
148182}
You can’t perform that action at this time.
0 commit comments