pvary commented on a change in pull request #1394:
URL: https://github.com/apache/iceberg/pull/1394#discussion_r481351246
##########
File path: mr/src/main/java/org/apache/iceberg/mr/Catalogs.java
##########
@@ -83,28 +86,32 @@ private static Table loadTable(Configuration conf, String
tableIdentifier, Strin
.impl(catalogLoaderClass)
.build()
.newInstance();
- return Optional.of(loader.load(conf));
+ Catalog catalog = loader.load(conf);
+ LOG.info("Loaded catalog {} using {}", catalog, catalogLoaderClass);
+ return Optional.of(catalog);
}
String catalogName = conf.get(InputFormatConfig.CATALOG);
if (catalogName != null) {
+ Catalog catalog;
switch (catalogName.toLowerCase()) {
case HADOOP:
String warehouseLocation =
conf.get(InputFormatConfig.HADOOP_CATALOG_WAREHOUSE_LOCATION);
- if (warehouseLocation != null) {
- return Optional.of(new HadoopCatalog(conf, warehouseLocation));
- }
-
- return Optional.of(new HadoopCatalog(conf));
+ catalog = (warehouseLocation != null) ? new HadoopCatalog(conf,
warehouseLocation) : new HadoopCatalog(conf);
+ LOG.info("Loaded Hadoop catalog {}", catalog);
+ return Optional.of(catalog);
case HIVE:
- return Optional.of(HiveCatalogs.loadCatalog(conf));
+ catalog = HiveCatalogs.loadCatalog(conf);
+ LOG.info("Loaded Hive Metastore catalog {}", catalog);
+ return Optional.of(catalog);
default:
throw new NoSuchNamespaceException("Catalog " + catalogName + " is
not supported.");
}
}
+ LOG.info("No catalog is used");
Review comment:
Changed the text
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]