-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CASSANDRA-20362: add setcachecapacity to nodetool #3925
base: trunk
Are you sure you want to change the base?
Conversation
maoling
commented
Feb 23, 2025
- more details in the CASSANDRA-20362
@Arguments(title = "<key-cache-period> <row-cache-period> <counter-cache-period>", | ||
usage = "<key-cache-period> <row-cache-period> <counter-cache-period>", | ||
description = "Key cache, row cache, and counter period (unit: second)", | ||
required = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to add test case for this
@Override | ||
public void execute(NodeProbe probe) | ||
{ | ||
checkArgument(args.size() == 3, "setcacheperiod requires key-cache-period, row-cache-period, and counter-cache-period args."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can add some argument -k for keyache , -r for row cache, -c for counter
And I think not all of these arguments are needed at one time for user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found your code has the same format with SetCacheCapacity/SetCacheKeysToSave , I'm not forcing you to do this now.
|
||
import static com.google.common.base.Preconditions.checkArgument; | ||
|
||
@Command(name = "setcacheperiod", description = "Set global key, row, and counter cache period (unit: second)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to : Set global key, row, and counter cache period in second units
Besides setting it to 0 seems meaningless.
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import io.airlift.airline.Arguments; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See CASSANDRA-17445 airlift will be deprecated