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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]