ravowlga123 commented on a change in pull request #1180: ZOOKEEPER-3300 CLI 
"history" to show 10 commands
URL: https://github.com/apache/zookeeper/pull/1180#discussion_r358228838
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeperMain.java
 ##########
 @@ -410,7 +410,7 @@ protected boolean processZKCmd(MyCommandOptions co) throws 
CliException, IOExcep
             history.put(commandCount, history.get(i));
             processCmd(cl);
         } else if (cmd.equals("history")) {
-            for (int i = commandCount - 10; i <= commandCount; ++i) {
+            for (int i = commandCount - 9; i <= commandCount; ++i) {
                 if (i < 0) {
 
 Review comment:
   Thanks for the review @maoling. I have made the changes so as not to include 
history as a recent cmd.

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


With regards,
Apache Git Services

Reply via email to