snazy commented on code in PR #1226:
URL: https://github.com/apache/polaris/pull/1226#discussion_r2008723221
##########
quarkus/admin/src/main/java/org/apache/polaris/admintool/PurgeCommand.java:
##########
@@ -37,9 +38,26 @@ public class PurgeCommand extends BaseCommand {
@Override
public Integer call() {
try {
- metaStoreManagerFactory.purgeRealms(realms);
- spec.commandLine().getOut().println("Purge completed successfully.");
- return 0;
+ var result = metaStoreManagerFactory.purgeRealms(realms);
+ var failed =
+ result.entrySet().stream()
+ .filter(e -> !e.getValue().isSuccess())
+ .map(Map.Entry::getKey)
+ .toList();
+ if (failed.isEmpty()) {
+ spec.commandLine().getOut().println("Purge completed successfully.");
+ return 0;
+ }
+
+ var out = spec.commandLine().getOut();
Review Comment:
Rather a nit, right?
--
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]