mchades commented on code in PR #5761:
URL: https://github.com/apache/gravitino/pull/5761#discussion_r1872614553
##########
core/src/main/java/org/apache/gravitino/catalog/CatalogManager.java:
##########
@@ -677,11 +678,42 @@ public boolean dropCatalog(NameIdentifier ident, boolean
force)
} catch (NoSuchMetalakeException | NoSuchCatalogException ignored) {
return false;
- } catch (IOException e) {
+ } catch (GravitinoRuntimeException e) {
+ throw e;
+
+ } catch (Exception e) {
throw new RuntimeException(e);
}
}
+ private boolean haveAvailableSchemas(
+ List<SchemaEntity> schemaEntities, CatalogEntity catalogEntity,
CatalogWrapper catalogWrapper)
+ throws Exception {
+ if (schemaEntities.isEmpty()) {
+ return false;
+ }
+
+ if (schemaEntities.size() == 1 &&
catalogEntity.getProvider().equals("kafka")) {
Review Comment:
Currently, only the Kafka catalog has the feature of having only one schema
(named default). Therefore, I think it may not be a compelling enough reason to
refactor at the API level.
But extra a method such as `inRawStatus(CatalogEntity, List<SchemaEntity>)`
sounds a good idea, WDYT?
--
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]