-
Notifications
You must be signed in to change notification settings - Fork 478
New admin check command structure implementation
#4806
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
Conversation
(Part of apache#4687) - Added new `admin check` command - `admin check list` prints the checks that can be run along with their descriptions and dependencies - `admin check run` runs all the checks or a specified list of checks (explicitly provide each check, provide a regex of the checks to run, or just run all if no further args are provided). The dependencies are run first and if a checks dependency fails, the check is skipped - Current impl of `admin check run` does not do any actual work besides printing that the check is running (to ensure correct run order) and returning an `OK` status - New IT AdminCheckIT - This IT includes a verion of the Checks where no work is actually done (right now, this is equivalent to the actual implementation). This is done so correct run order, correct checks run, etc. can be verified without actually running the checks which may take a long time. More tests can be added later to test the actual check functionality when that is implemented. - No existing functionality was changed
Some example outputs and a sketch of the current dependency tree as support:Sample outputs:In this example, I made |
| } | ||
| } | ||
|
|
||
| private static void listChecks() { |
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.
Is there a reason you didn't want to use a logger here?
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.
The admin commands print using System.out which is what I stuck with. I'm not really sure how using a logger here would work... It wouldn't print to the console when something like accumulo admin check run is executed from the shell as far as I'm aware. It may also be harder to format nicely using a logger. I'm not sure what would be gained from using a logger. If we want time to be included, we can just manually include that.
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.
If we want the output to go to a file, we can just redirect the output there.
|
|
||
| private static void | ||
| printChecksResults(TreeMap<CheckCommand.Check,CheckCommand.CheckStatus> checkStatus) { | ||
| System.out.println(); |
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.
Same logger question here
This is part of #4687
Changes:
admin checkcommandadmin check listprints the checks that can be run along with their descriptions and dependenciesadmin check runruns all the checks or a specified list of checks (explicitly provide each check, provide a regex of the checks to run, or just run all if no further args are provided). The dependencies are run first and if a checks dependency fails, the check is skippedadmin check rundoes not do any actual work besides printing that the check is running (to ensure correct run order) and returning anOKstatusverified without actually running the checks which may take a long time. More tests can be added later to test the actual check functionality when that is implemented.
Questions: