Skip to content

Commit

Permalink
[AMORO-2638] fix refresh-external-catalogs cannot be completed when…
Browse files Browse the repository at this point in the history
… exist database listTable fails (#2639)

Co-authored-by: huyuanfeng <huyuanfeng@huya.com>
  • Loading branch information
huyuanfeng2018 and huyuanfeng authored Mar 15, 2024
1 parent 71bb159 commit c1c615f
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -461,10 +462,17 @@ void exploreExternalCatalog() {
try {
tableIdentifiersFutures.add(
CompletableFuture.supplyAsync(
() ->
externalCatalog.listTables(database).stream()
() -> {
try {
return externalCatalog.listTables(database).stream()
.map(TableIdentity::new)
.collect(Collectors.toSet()),
.collect(Collectors.toSet());
} catch (Exception e) {
LOG.error(
"TableExplorer list tables in database {} error", database, e);
return new HashSet<>();
}
},
tableExplorerExecutors));
} catch (RejectedExecutionException e) {
LOG.error(
Expand Down

0 comments on commit c1c615f

Please sign in to comment.