You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/11/01 04:07:02 UTC

[GitHub] [skywalking-banyandb-java-client] lujiajing1126 commented on a change in pull request #3: Feat: new stream api

lujiajing1126 commented on a change in pull request #3:
URL: https://github.com/apache/skywalking-banyandb-java-client/pull/3#discussion_r739944959



##########
File path: src/main/proto/banyandb/v1/banyandb-stream.proto
##########
@@ -45,63 +65,43 @@ message QueryRequest {
   uint32 limit = 4;
   // order_by is given to specify the sort for a field. So far, only fields in the type of Integer are supported
   banyandb.v1.QueryOrder order_by = 5;
-  // fields are indexed. Some typical fields are listed below,
-  // - trace_id: if given, it takes precedence over other fields and will be used to retrieve entities before other conditions are imposed
-  // - duration: typical for trace context
-  repeated banyandb.v1.PairQuery fields = 6;
-  // projection can be used to select the key names of the entities in the response
+  // tag_families are indexed.
+  message Criteria {
+    string tag_family_name = 1;
+    repeated banyandb.v1.Condition conditions = 2;
+  }
+  repeated Criteria criteria = 6;
+  // projection can be used to select the key names of the element in the response
   banyandb.v1.Projection projection = 7;
 }
 
-// QueryResponse is the response for a query to the Query module.
-message QueryResponse {
-  // entities are the actual data returned
-  repeated Entity entities = 1;
-}
-
-// Entity represents
-// (Trace context) a Span defined in Google Dapper paper or equivalently a Segment in Skywalking.
-// (Log context) a log
-message Entity {
-  // entity_id could be span_id of a Span or segment_id of a Segment in the context of Trace
-  string entity_id = 1;
-  // timestamp represents
+message ElementValue {
+  // element_id could be span_id of a Span or segment_id of a Segment in the context of stream
+  string element_id = 1;
+  // timestamp_nanoseconds is in the timeunit of nanoseconds. It represents
   // 1) either the start time of a Span/Segment,
   // 2) or the timestamp of a log
   google.protobuf.Timestamp timestamp = 2;
-  // data_binary contains all un-indexed Tags and other key-value pairs
-  bytes data_binary = 3;
-  // fields contains all indexed Field. Some typical names,
-  // - trace_id
-  // - duration
-  // - service_name
-  // - service_instance_id
-  // - end_time_nanoseconds
-  repeated banyandb.v1.TypedPair fields = 4;
+  // the order of tag_families' items match the stream schema
+  repeated banyandb.v1.TagFamilyForWrite tag_families = 3;
 }
 
-
 message WriteRequest {
   // the metadata is only required in the first write.
   banyandb.v1.Metadata metadata = 1;
-  // the entity is required.
-  EntityValue entity = 2;
+  // the element is required.
+  ElementValue element = 2;
 }
 
 message WriteResponse {}
 
-message EntityValue {
-  // entity_id could be span_id of a Span or segment_id of a Segment in the context of Trace
-  string entity_id = 1;
-  // timestamp_nanoseconds is in the timeunit of nanoseconds. It represents
-  // 1) either the start time of a Span/Segment,
-  // 2) or the timestamp of a log
-  google.protobuf.Timestamp timestamp = 2;
-  // binary representation of segments, including tags, spans...
-  bytes data_binary = 3;
-  // support all of indexed fields in the fields.
-  // Pair only has value, as the value of PairValue match with the key
-  // by the index rules and index rule bindings of Metadata group.
-  // indexed fields of multiple entities are compression in the fields.
-  repeated banyandb.v1.Field fields = 4;
+message InternalWriteRequest {
+  uint32 shard_id = 1;
+  bytes series_hash = 2;
+  WriteRequest request = 3;
+}

Review comment:
       Removed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org