Wrap `deleteProperty` API to the BanyanDBStorageClient. (#10971)

This commit is contained in:
Wan Kai 2023-06-20 23:12:26 +08:00 committed by GitHub
parent cb2676845b
commit ba771097f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -9,6 +9,7 @@
* Add Neo4j component ID(112) language: Python.
* Add Istio ServiceEntry registry to resolve unknown IPs in ALS.
* Improve Kubernetes coordinator to only select ready OAP Pods to build cluster.
* Wrap `deleteProperty` API to the BanyanDBStorageClient.
#### UI

View File

@ -34,6 +34,7 @@ import org.apache.skywalking.banyandb.v1.client.grpc.exception.BanyanDBException
import org.apache.skywalking.banyandb.v1.client.metadata.Group;
import org.apache.skywalking.banyandb.v1.client.metadata.Measure;
import org.apache.skywalking.banyandb.v1.client.metadata.Property;
import org.apache.skywalking.banyandb.v1.client.metadata.PropertyStore;
import org.apache.skywalking.banyandb.v1.client.metadata.Stream;
import org.apache.skywalking.banyandb.v1.client.metadata.TopNAggregation;
import org.apache.skywalking.oap.server.library.client.Client;
@ -99,6 +100,17 @@ public class BanyanDBStorageClient implements Client, HealthCheckable {
}
}
public PropertyStore.DeleteResult deleteProperty(String group, String name, String id, String... tags) throws IOException {
try {
PropertyStore.DeleteResult result = this.client.deleteProperty(group, name, id, tags);
this.healthChecker.health();
return result;
} catch (BanyanDBException ex) {
healthChecker.unHealth(ex);
throw new IOException("fail to delete property", ex);
}
}
public StreamQueryResponse query(StreamQuery q) throws IOException {
try {
StreamQueryResponse response = this.client.query(q);