Conversation
|
There is one usage in DeleteFormatter that is prompting y/n but seems to be following a different pattern was left alone for now and is not part of this PR. |
|
Set this a draft - there may be an issue in ShellIT - this should not be merged until that is resolved |
I think the main thing about that one is that it catches EndOfFileException, which I think handles things like |
shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java
Show resolved
Hide resolved
shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java
Outdated
Show resolved
Hide resolved
shell/src/main/java/org/apache/accumulo/shell/commands/DeleteNamespaceCommand.java
Outdated
Show resolved
Hide resolved
shell/src/main/java/org/apache/accumulo/shell/commands/DropUserCommand.java
Outdated
Show resolved
Hide resolved
shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java
Outdated
Show resolved
Hide resolved
* ShellIT was erroring on the configTest method. Adds force handler logic to pass test * Renames `yorn` method to `confirm` for better readability. * Simplifies logic in `DeleteNamespaceCommand` and `DropUserCommand`. * Updates wording in `MergeCommand` to convey more concern.
Found the issue in ShellIT was due to the forceOpt handling in the Issue could be replicated by checking out 5ac8ac and running the following test This issue has been fixed in ea20d0 |
DomGarguilo
left a comment
There was a problem hiding this comment.
LGTM. Tested out the changed commands and everything seems to be working as expected.
shell/src/main/java/org/apache/accumulo/shell/commands/ConfigCommand.java
Outdated
Show resolved
Hide resolved
shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java
Show resolved
Hide resolved
DomGarguilo
left a comment
There was a problem hiding this comment.
LGTM. Tested out the changed commands and everything seems to be working as expected.
ctubbsii
left a comment
There was a problem hiding this comment.
I think it's worth considering restoring the slight change in behavior that existed previously that used the more flag to discontinue processing the rest of the items in the loop, before this is merged. Perhaps my suggestion to use Optional for this will work, or perhaps there's something cleaner. But, I don't think it's a good idea to force users to continue to be prompted for the remaining items in a loop if the previous code aborted the loop.
shell/src/main/java/org/apache/accumulo/shell/commands/MergeCommand.java
Show resolved
Hide resolved
shell/src/main/java/org/apache/accumulo/shell/commands/TableOperation.java
Show resolved
Hide resolved
Replaces the original boolean return with Optional<Boolean> to handle abort actions. Standardizes the yes/no prompt in DeleterFormatter.
* Replace `.filter(y -> y).isPresent()` with `.orElse(false)` * Simplify TableOperation loop logic
ddanielr
left a comment
There was a problem hiding this comment.
Tested these changes with table deletion commands and you can now exit out of the loop of multi-table operations instead of getting prompted for each one.
Prompting the user for y/n was handled in multiple places in shell commands. This PR consolidates those into a single method in the Shell.
This was identified as a follow-on issue in PR #3680