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

[Improvement] Move check for enable and disable command in Gravitino CLI to command #6136

Open
justinmclean opened this issue Jan 7, 2025 · 3 comments · May be fixed by #6163
Open

[Improvement] Move check for enable and disable command in Gravitino CLI to command #6136

justinmclean opened this issue Jan 7, 2025 · 3 comments · May be fixed by #6163
Assignees
Labels
good first issue Good for newcomers improvement Improvements on everything

Comments

@justinmclean
Copy link
Member

What would you like to be improved?

In GravitinoCommandLine.java there a check for enable and disable commands, this code should be moved to the command.

        if (line.hasOption(GravitinoOptions.ENABLE) && line.hasOption(GravitinoOptions.DISABLE)) {
          System.err.println(ErrorMessages.INVALID_ENABLE_DISABLE);
          Main.exit(-1);
        }

How should we improve?

Moved code to validate methods.

@justinmclean justinmclean added good first issue Good for newcomers improvement Improvements on everything labels Jan 7, 2025
@VigneshSK17
Copy link
Contributor

I would like to work on this

@VigneshSK17
Copy link
Contributor

@justinmclean Would extending Command to implement the verify() method be the proper way of implementing this?
Should I also look into combining the Enable and Disable commands?

@justinmclean
Copy link
Member Author

The code just needs to be moved to the relevant command's validate method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers improvement Improvements on everything
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants