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/08/12 08:38:22 UTC
[GitHub] [skywalking-banyandb] Fine0830 opened a new pull request #33: feat: Implement Query in the liaison
Fine0830 opened a new pull request #33:
URL: https://github.com/apache/skywalking-banyandb/pull/33
Implement Query in the liaison
Signed-off-by: Qiuxia Fan <qi...@apache.org>
--
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
[GitHub] [skywalking-banyandb] hanahmily commented on a change in pull request #33: feat: Implement Query in the liaison
Posted by GitBox <gi...@apache.org>.
hanahmily commented on a change in pull request #33:
URL: https://github.com/apache/skywalking-banyandb/pull/33#discussion_r687730669
##########
File path: banyand/liaison/grpc/grpc_test.go
##########
@@ -234,13 +233,11 @@ func traceQuery(t *testing.T, conn *grpclib.ClientConn) {
ctx := context.Background()
sT, eT := time.Now().Add(-3*time.Hour), time.Now()
criteria := pb.NewQueryRequestBuilder().
- Limit(5).
- Offset(10).
- OrderBy("service_instance_id", v1.QueryOrder_SORT_DESC).
- Metadata("default", "trace").
- Projection("http.method", "service_id", "service_instance_id").
- Fields("service_id", "=", "my_app", "http.method", "=", "GET").
+ Limit(10).
+ Offset(0).
+ Metadata("default", "sw").
TimeRange(sT, eT).
+ Projection("trace_id").
Build()
stream, errRev := client.Query(ctx, criteria)
if errRev != nil {
Review comment:
The query result should match the written data.
--
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
[GitHub] [skywalking-banyandb] lujiajing1126 commented on a change in pull request #33: feat: Implement Query in the liaison
Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #33:
URL: https://github.com/apache/skywalking-banyandb/pull/33#discussion_r687521414
##########
File path: banyand/liaison/grpc/grpc.go
##########
@@ -334,9 +335,30 @@ func (s *Server) Write(TraceWriteServer v1.TraceService_WriteServer) error {
}
func (s *Server) Query(ctx context.Context, entityCriteria *v1.QueryRequest) (*v1.QueryResponse, error) {
- log.Println("entityCriteria:", entityCriteria)
-
- return &v1.QueryResponse{}, nil
+ message := bus.NewMessage(bus.MessageID(time.Now().UnixNano()), entityCriteria)
+ feat, errQuery := s.pipeline.Publish(data.TopicQueryEvent, message)
+ if errQuery != nil {
+ return nil, errQuery
+ }
+ msg, errFeat := feat.Get()
+ if errFeat != nil {
+ return nil, errFeat
+ }
+ queryMsg := msg.Data()
+
+ var arr []*v1.Entity
+ switch reflect.TypeOf(queryMsg).Kind() {
Review comment:
You actually do not need reflect here.
Just use [type-assertion](https://tour.golang.org/methods/15), see the examples.
--
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
[GitHub] [skywalking-banyandb] kezhenxu94 commented on pull request #33: feat: Implement Query in the liaison
Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on pull request #33:
URL: https://github.com/apache/skywalking-banyandb/pull/33#issuecomment-899949724
The test seems to be flaky
https://github.com/apache/skywalking-banyandb/pull/38/checks?check_run_id=3346386041#step:5:76
--
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
[GitHub] [skywalking-banyandb] Fine0830 commented on pull request #33: feat: Implement Query in the liaison
Posted by GitBox <gi...@apache.org>.
Fine0830 commented on pull request #33:
URL: https://github.com/apache/skywalking-banyandb/pull/33#issuecomment-898103667
Done
--
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
[GitHub] [skywalking-banyandb] hanahmily merged pull request #33: feat: Implement Query in the liaison
Posted by GitBox <gi...@apache.org>.
hanahmily merged pull request #33:
URL: https://github.com/apache/skywalking-banyandb/pull/33
--
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