hanahmily commented on code in PR #54:
URL:
https://github.com/apache/skywalking-banyandb-java-client/pull/54#discussion_r1580332675
##########
src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java:
##########
@@ -348,11 +348,18 @@ public StreamWrite createStreamWrite(String group, String
name, final String ele
public StreamQueryResponse query(StreamQuery streamQuery) throws
BanyanDBException {
checkState(this.streamServiceStub != null, "stream service is null");
- final BanyandbStream.QueryResponse response =
HandleExceptionsWith.callAndTranslateApiException(() ->
- this.streamServiceBlockingStub
- .withDeadlineAfter(this.getOptions().getDeadline(),
TimeUnit.SECONDS)
-
.query(streamQuery.build(this.metadataCache.findMetadata(streamQuery.group,
streamQuery.name))));
- return new StreamQueryResponse(response);
+ for (String group : streamQuery.groups) {
+ MetadataCache.EntityMetadata em =
this.metadataCache.findMetadata(group, streamQuery.name);
+ if (em != null) {
+ final BanyandbStream.QueryResponse response =
HandleExceptionsWith.callAndTranslateApiException(() ->
+ this.streamServiceBlockingStub
+
.withDeadlineAfter(this.getOptions().getDeadline(), TimeUnit.SECONDS)
+ .query(streamQuery.build(em)));
+ return new StreamQueryResponse(response);
Review Comment:
No, streamQuery includes all groups. Here, I simply use the first group to
determine the resource's tag family and build the query request. This operation
assumes that resources within these groups have the same tag family and tags.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]