amaliujia commented on code in PR #1476:
URL: https://github.com/apache/ratis/pull/1476#discussion_r3440152612
##########
ratis-examples/src/main/java/org/apache/ratis/examples/membership/server/RaftCluster.java:
##########
@@ -143,15 +143,24 @@ public void counterIncrement() throws IOException {
}
public void queryCounter() throws IOException {
- RaftClient client = createClient();
- try {
- RaftClientReply reply =
client.io().sendReadOnly(CounterCommand.GET.getMessage());
- String count = reply.getMessage().getContent().toStringUtf8();
- System.out.println("Current counter value: " + count);
- } finally {
- client.close();
- }
+ RaftClient client = createClient();
Review Comment:
Nit: wrong indents
--
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]