qian0817 commented on code in PR #867:
URL: https://github.com/apache/ratis/pull/867#discussion_r1152778968


##########
ratis-shell/src/main/java/org/apache/ratis/shell/cli/sh/command/AbstractRatisCommand.java:
##########
@@ -215,4 +215,8 @@ protected List<RaftPeerId> getIds(String[] optionValues, 
BiConsumer<RaftPeerId,
     }
     return ids;
   }
+
+  protected List<RaftPeer> filterServer(List<RaftPeer> peers, RaftPeerRole 
role) {
+    return peers.stream().filter(it -> it.getStartupRole() == 
role).collect(Collectors.toList());

Review Comment:
   Rewritten the code, please review it again, thanks.



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