You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/10/01 17:43:07 UTC

[GitHub] [accumulo] cshannon opened a new pull request, #2992: Improve output and user experience of accumulo admin utilities

cshannon opened a new pull request, #2992:
URL: https://github.com/apache/accumulo/pull/2992

   * Update DeleteZooInstance to prompt user to confirm if trying to delete the current instance
   * Update TabletServerLocks to display <none> instead of null if no locks for the tablet server
   
   This is a follow on to #2807


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] dlmarion commented on a diff in pull request #2992: Improve output and user experience of accumulo admin utilities

Posted by GitBox <gi...@apache.org>.
dlmarion commented on code in PR #2992:
URL: https://github.com/apache/accumulo/pull/2992#discussion_r985701751


##########
server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java:
##########
@@ -103,6 +112,19 @@ private static void cleanAllOld(ServerContext context, final ZooReaderWriter zk)
     }
   }
 
+  private static boolean checkCurrentInstance(ServerContext context, String instanceName,
+      String instanceId) {
+    if (instanceId.equals(context.getInstanceID().canonical())) {
+      String prompt = String.valueOf(
+          System.console().readLine("Warning: This is the current instance, are you sure? Y/n: "));
+      if (prompt == null || !prompt.equals("Y")) {

Review Comment:
   Table deletion verification is done [here](https://github.com/apache/accumulo/blob/main/shell/src/main/java/org/apache/accumulo/shell/commands/TableOperation.java#L90), as an example.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] cshannon commented on a diff in pull request #2992: Improve output and user experience of accumulo admin utilities

Posted by GitBox <gi...@apache.org>.
cshannon commented on code in PR #2992:
URL: https://github.com/apache/accumulo/pull/2992#discussion_r985822389


##########
server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java:
##########
@@ -103,6 +112,19 @@ private static void cleanAllOld(ServerContext context, final ZooReaderWriter zk)
     }
   }
 
+  private static boolean checkCurrentInstance(ServerContext context, String instanceName,
+      String instanceId) {
+    if (instanceId.equals(context.getInstanceID().canonical())) {
+      String prompt = String.valueOf(
+          System.console().readLine("Warning: This is the current instance, are you sure? Y/n: "));
+      if (prompt == null || !prompt.equals("Y")) {

Review Comment:
   I agree 100% and will change it. I didn't know if we had other examples of confirm prompts but I should have searched because I agree that it should be made consistent and match if we already have a normal pattern for prompting the user for yes/no.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [accumulo] Manno15 commented on a diff in pull request #2992: Improve output and user experience of accumulo admin utilities

Posted by GitBox <gi...@apache.org>.
Manno15 commented on code in PR #2992:
URL: https://github.com/apache/accumulo/pull/2992#discussion_r985135394


##########
server/base/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java:
##########
@@ -103,6 +112,19 @@ private static void cleanAllOld(ServerContext context, final ZooReaderWriter zk)
     }
   }
 
+  private static boolean checkCurrentInstance(ServerContext context, String instanceName,
+      String instanceId) {
+    if (instanceId.equals(context.getInstanceID().canonical())) {
+      String prompt = String.valueOf(
+          System.console().readLine("Warning: This is the current instance, are you sure? Y/n: "));
+      if (prompt == null || !prompt.equals("Y")) {

Review Comment:
   I know in other areas (like when deleting a table or namespace with the shell) we use (yes|no) and we also ignore cases. Not really sure how consistent we are with that though. At least ignoring the case would be a reasonable expectation from the user's viewpoint. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org