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 2022/04/07 01:07:43 UTC
[GitHub] [skywalking-banyandb-java-client] hanahmily commented on a diff in pull request #10: Add property API
hanahmily commented on code in PR #10:
URL: https://github.com/apache/skywalking-banyandb-java-client/pull/10#discussion_r844551948
##########
src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java:
##########
@@ -314,6 +317,31 @@ public void define(Measure measure) throws BanyanDBException {
MetadataCache.INSTANCE.register(measure);
}
+ /**
+ * Create or update the property
+ *
+ * @param property the property to be stored in the BanyanBD
+ */
+ public void save(Property property) throws BanyanDBException {
+ PropertyStore store = new PropertyStore(checkNotNull(this.channel));
+ try {
+ store.get(property.group(), property.name(), property.id());
+ store.update(property);
+ } catch (BanyanDBException ex) {
+ // TODO: polish "404" response code in BanyanDB
Review Comment:
Do you tend to have the server return 404 on missing properties?
--
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