Skip to content
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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

maoling
Copy link
Member

@maoling maoling commented Feb 23, 2025

@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)
Copy link
Contributor

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.");
Copy link
Contributor

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.

Copy link
Contributor

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)")
Copy link
Contributor

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;
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants