runzhiwang commented on a change in pull request #308:
URL: https://github.com/apache/incubator-ratis/pull/308#discussion_r533100887



##########
File path: 
ratis-server/src/main/java/org/apache/ratis/server/impl/RaftServerImpl.java
##########
@@ -145,6 +152,16 @@
         getMemberId(), () -> commitInfoCache::get, () -> retryCache);
 
     this.startComplete = new AtomicBoolean(false);
+
+    this.raftClient = JavaUtils.memoize(() -> {
+      final RaftProperties p = new RaftProperties();
+      RaftConfigKeys.Rpc.setType(p, SupportedRpcType.GRPC);

Review comment:
       Currently, netty client did not implement async api, so I ignore 
TestNettyDataStreamWithNettyCluster, otherwise will throw 
UnsupportedOperationException.
   ```
   Caused by: java.lang.UnsupportedOperationException: class 
org.apache.ratis.netty.client.NettyClientRpc does not support this method.
           at 
org.apache.ratis.client.RaftClientRpc.sendRequestAsync(RaftClientRpc.java:35)
           at 
org.apache.ratis.client.impl.OrderedAsync.sendRequest(OrderedAsync.java:234)
           at 
org.apache.ratis.client.impl.OrderedAsync.sendRequestWithRetry(OrderedAsync.java:188)
           at 
org.apache.ratis.util.SlidingWindow$Client.sendOrDelayRequest(SlidingWindow.java:278)
           at 
org.apache.ratis.util.SlidingWindow$Client.submitNewRequest(SlidingWindow.java:257)
           at 
org.apache.ratis.client.impl.OrderedAsync.send(OrderedAsync.java:169)
           at 
org.apache.ratis.client.impl.OrderedAsync.newInstance(OrderedAsync.java:117)
           at 
org.apache.ratis.client.impl.RaftClientImpl.lambda$new$0(RaftClientImpl.java:154)
           at 
org.apache.ratis.util.MemoizedSupplier.get(MemoizedSupplier.java:62)
           at 
org.apache.ratis.client.impl.RaftClientImpl.getOrderedAsync(RaftClientImpl.java:206)
           at org.apache.ratis.client.impl.AsyncImpl.send(AsyncImpl.java:41)
           at 
org.apache.ratis.client.impl.AsyncImpl.sendForward(AsyncImpl.java:67)
           at 
org.apache.ratis.netty.server.DataStreamManagement.startTransaction(DataStreamManagement.java:304)
           at 
org.apache.ratis.netty.server.DataStreamManagement.lambda$null$7(DataStreamManagement.java:384)
           at 
java.util.concurrent.CompletableFuture.biApply(CompletableFuture.java:1105)
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to