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 01:20:50 UTC

[GitHub] [incubator-ratis] runzhiwang opened a new pull request #255: RATIS-1090. Implement RaftClient.getDataStreamApi

runzhiwang opened a new pull request #255:
URL: https://github.com/apache/incubator-ratis/pull/255


   ## What changes were proposed in this pull request?
   
    Implement RaftClient.getDataStreamApi
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/RATIS-1090
   
   ## How was this patch tested?
   
   Existed ut.
   


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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [incubator-ratis] runzhiwang commented on pull request #255: RATIS-1090. Implement RaftClient.getDataStreamApi

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on pull request #255:
URL: https://github.com/apache/incubator-ratis/pull/255#issuecomment-722153712


   @szetszwo I have updated the patch. Could you help review it again ?


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



[GitHub] [incubator-ratis] runzhiwang commented on pull request #255: RATIS-1090. Implement RaftClient.getDataStreamApi

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on pull request #255:
URL: https://github.com/apache/incubator-ratis/pull/255#issuecomment-722068268


   @szetszwo Could you help review this patch ? Thanks a lot.


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



[GitHub] [incubator-ratis] szetszwo merged pull request #255: RATIS-1090. Implement RaftClient.getDataStreamApi

Posted by GitBox <gi...@apache.org>.
szetszwo merged pull request #255:
URL: https://github.com/apache/incubator-ratis/pull/255


   


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