wu-sheng commented on code in PR #46:
URL: 
https://github.com/apache/skywalking-banyandb-java-client/pull/46#discussion_r1311778812


##########
src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java:
##########
@@ -198,33 +204,75 @@ void connect(Channel channel) {
      * Perform a single write with given entity.
      *
      * @param streamWrite the entity to be written
+     * @return a future of write result
      */
-    public void write(StreamWrite streamWrite) {
+    public CompletableFuture<Void> write(StreamWrite streamWrite) {
         checkState(this.streamServiceStub != null, "stream service is null");
 
+        CompletableFuture<Void> future = new CompletableFuture<>();
         final StreamObserver<BanyandbStream.WriteRequest> 
writeRequestStreamObserver
                 = this.streamServiceStub
                 .withDeadlineAfter(this.getOptions().getDeadline(), 
TimeUnit.SECONDS)
                 .write(
                         new StreamObserver<BanyandbStream.WriteResponse>() {
+                            private BanyanDBException responseException;
+
                             @Override
                             public void onNext(BanyandbStream.WriteResponse 
writeResponse) {
+                                switch (writeResponse.getStatus()) {
+                                case STATUS_RECEIVE_ERROR:

Review Comment:
   Is this the correct format? No indent for the case statement.



-- 
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]

Reply via email to