lujiajing1126 commented on a change in pull request #4: URL: https://github.com/apache/skywalking-banyandb-java-client/pull/4#discussion_r746292142
########## File path: README.md ########## @@ -19,10 +19,81 @@ Create a `BanyanDBClient` with host, port and a user-specified group and then es ```java // use `default` group client = new BanyanDBClient("127.0.0.1", 17912, "default"); -// establish a connection +// to send any request, a connection to the server must be estabilished client.connect(channel); ``` +## Schema Management + +### Group + +To save and fetch data, group and schema must be defined first, + +```java +GroupRegistry groupRegistry = client.groupRegistry(); +// create a group called "default" +groupRegistry.create("default"); +// list group +List<String> groups = groupRegistry.list(); +// check existence +boolean existence = groupRegistry.exist("default"); +``` + +### Stream + +Then we may define a stream with customized configurations, + +```java +StreamMetadataRegistry streamRegistry = client.streamRegistry(); +// build a stream "sw" with 2 shards and ttl equals to 30 days +Stream s = new Stream("sw", 2, Duration.ofDays(30)); Review comment: > Wait a moment, I can see stream is created from client, what is the issue of using client group? I suppose @hanahmily was referring to the `GroupRegistry`. You can CRUD groups other than that one you set for the client. So it may be confusing. -- 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-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org