Skip to content

Commit

Permalink
[apache#5831] fix(CLI): Fix Dropping a metalake via the Gravitino CLI…
Browse files Browse the repository at this point in the history
… gives an "in use" exception.

Dropping a metalake via the Gravitino CLI gives an "in use" exception.if a metalake in use, it should give some hints.
  • Loading branch information
Abyss-lord committed Dec 19, 2024
1 parent 08f7d91 commit 129ab27
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.apache.gravitino.cli.AreYouSure;
import org.apache.gravitino.cli.ErrorMessages;
import org.apache.gravitino.client.GravitinoAdminClient;
import org.apache.gravitino.exceptions.MetalakeInUseException;
import org.apache.gravitino.exceptions.NoSuchMetalakeException;

public class DeleteMetalake extends Command {
Expand Down Expand Up @@ -57,6 +58,8 @@ public void handle() {
} catch (NoSuchMetalakeException err) {
System.err.println(ErrorMessages.UNKNOWN_METALAKE);
return;
} catch (MetalakeInUseException inUseException) {
System.err.println(metalake + " in use, plz disable it.");
} catch (Exception exp) {
System.err.println(exp.getMessage());
return;
Expand Down

0 comments on commit 129ab27

Please sign in to comment.