nicoloboschi commented on a change in pull request #3160:
URL: https://github.com/apache/bookkeeper/pull/3160#discussion_r839018691



##########
File path: 
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
##########
@@ -1238,38 +1242,42 @@ public void processResult(int rc, String s, Object ctx) 
{
      */
     public static boolean format(ServerConfiguration conf,
             boolean isInteractive, boolean force) throws Exception {
-        return runFunctionWithMetadataBookieDriver(conf, driver -> {
-            try {
-                try (RegistrationManager regManager = 
driver.createRegistrationManager()) {
-                    boolean ledgerRootExists = regManager.prepareFormat();
-
-                    // If old data was there then confirm with admin.
-                    boolean doFormat = true;
-                    if (ledgerRootExists) {
-                        if (!isInteractive) {
-                            // If non interactive and force is set, then 
delete old data.
-                            doFormat = force;
-                        } else {
-                            // Confirm with the admin.
-                            doFormat = IOUtils
-                                    .confirmPrompt("Ledger root already 
exists. "
-                                            + "Are you sure to format 
bookkeeper metadata? "
-                                            + "This may cause data loss.");
+        return runFunctionWithMetadataBookieDriver(conf, new 
Function<MetadataBookieDriver, Boolean>() {

Review comment:
       just moved to non-lambda to add the suppression




-- 
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]


Reply via email to