hanahmily commented on code in PR #54:
URL:
https://github.com/apache/skywalking-banyandb-java-client/pull/54#discussion_r1580329455
##########
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:
Sorry, it seems inappropriate to handle this. I will fix it.
--
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]