Jzjsnow commented on code in PR #3534:
URL: https://github.com/apache/amoro/pull/3534#discussion_r2063482007
##########
amoro-ams/src/main/java/org/apache/amoro/server/table/DefaultTableService.java:
##########
@@ -275,18 +274,24 @@ public void exploreExternalCatalog(ExternalCatalog
externalCatalog) {
try {
tableIdentifiersFutures.add(
CompletableFuture.supplyAsync(
- () -> {
- try {
- return
externalCatalog.listTables(database).stream()
- .map(TableIdentity::new)
- .collect(Collectors.toSet());
- } catch (Exception e) {
- LOG.error(
- "TableExplorer list tables in database {}
error", database, e);
- return new HashSet<>();
- }
- },
- tableExplorerExecutors));
+ () -> {
+ try {
+ return
externalCatalog.listTables(database).stream()
+ .map(TableIdentity::new)
+ .collect(Collectors.toSet());
+ } catch (Exception e) {
Review Comment:
Sure, with `exceptionally()`, single thread exceptions can be thrown
directly. Thanks for the hint!
--
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]