[
https://issues.apache.org/jira/browse/CASSANDRA-20851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18014937#comment-18014937
]
Stefan Miklosovic commented on CASSANDRA-20851:
-----------------------------------------------
I have been trying to do something "smart" as reading from the end of the file
etc. but performance wise it was actually worse when number of commands to
print is cca equal to number of lines in history file. What I measured, it was
not significantly faster on default output either (processing last 1000 lines).
Just reading whole file to a list and printing just a subset of that is just
enough. My history file has 28 MB, containing 400k lines and it just prints it
below 2 seconds.
file containing 1000 lines
{code:java}
real 0m0,706s
user 0m1,749s
sys 0m0,175s
{code}
file containing 400k lines
{code:java}
real 0m0,804s
user 0m1,914s
sys 0m0,196s
{code}
> Implement nodetool history command
> ----------------------------------
>
> Key: CASSANDRA-20851
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20851
> Project: Apache Cassandra
> Issue Type: New Feature
> Components: Legacy/Tools
> Reporter: Stefan Miklosovic
> Assignee: Stefan Miklosovic
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> There is already history file with all previous commands in
> `~/.cassandra/nodetool.history` but there is no corresponding nodetool
> command which would display it. A user just has to go to that file and
> inspect it manually which is not comfortable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]