You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/11/05 02:40:50 UTC

[GitHub] [incubator-ratis] szetszwo commented on a change in pull request #255: RATIS-1090. Implement RaftClient.getDataStreamApi

szetszwo commented on a change in pull request #255:
URL: https://github.com/apache/incubator-ratis/pull/255#discussion_r517731730



##########
File path: ratis-client/src/main/java/org/apache/ratis/client/RaftClient.java
##########
@@ -127,6 +123,12 @@ public Builder setLeaderId(RaftPeerId leaderId) {
       return this;
     }
 
+    /** Set primary. */
+    public Builder setPrimary(RaftPeer primary) {

Review comment:
       Let's call this setPrimaryDataStreamServer.

##########
File path: ratis-client/src/main/java/org/apache/ratis/client/impl/DataStreamClientImpl.java
##########
@@ -45,13 +45,14 @@
 public class DataStreamClientImpl implements DataStreamClient {
   // TODO Similar to RaftClientImpl, pass ClientId and RaftGroupId/RaftGroup in constructor.
   private final ClientId clientId = ClientId.randomId();
-  private final RaftGroupId groupId =  RaftGroupId.randomId();
+  private final RaftGroupId groupId;
 
   private final RaftPeer raftServer;
   private final DataStreamClientRpc dataStreamClientRpc;
   private final OrderedStreamAsync orderedStreamAsync;
 
-  public DataStreamClientImpl(RaftPeer server, RaftProperties properties, Parameters parameters) {
+  public DataStreamClientImpl(RaftGroupId groupId, RaftPeer server, RaftProperties properties, Parameters parameters) {

Review comment:
       We should also pass the ClientId.




----------------------------------------------------------------
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:
users@infra.apache.org