in src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java [411:424]
public MeasureQueryResponse query(MeasureQuery measureQuery) throws BanyanDBException {
checkState(this.streamServiceStub != null, "measure service is null");
for (String group : measureQuery.groups) {
MetadataCache.EntityMetadata em = this.metadataCache.findMeasureMetadata(group, measureQuery.name);
if (em != null) {
final BanyandbMeasure.QueryResponse response = HandleExceptionsWith.callAndTranslateApiException(() ->
this.measureServiceBlockingStub
.withDeadlineAfter(this.getOptions().getDeadline(), TimeUnit.SECONDS)
.query(measureQuery.build(em)));
return new MeasureQueryResponse(response);
}
}
throw new RuntimeException("No metadata found for the query");
}