You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "wombatu-kun (via GitHub)" <gi...@apache.org> on 2025/03/03 23:36:32 UTC
Re: [PR] [HUDI-8666] Revisit error message when timeline layout version cannot be read [hudi]
wombatu-kun commented on code in PR #12867:
URL: https://github.com/apache/hudi/pull/12867#discussion_r1978387701
##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/TableCommand.java:
##########
@@ -149,7 +150,7 @@ public String createTable(
try {
HoodieTableMetaClient.builder().setConf(HoodieCLI.conf.newInstance()).setBasePath(path).build();
existing = true;
- } catch (TableNotFoundException dfe) {
+ } catch (TableNotFoundException | InvalidTableException dfe) {
Review Comment:
Both `TableNotFoundException` and `InvalidTableException` extend `HoodieException`, which is unchecked. We don't need to catch them every time initialing the meta client, but there are some cases, where it's necessary/reasonable. Moreover, `HoodieIOException` (extends `HoodieException`), also might be thrown while creating the meta client. So i think, it's better to distinguish these errors not only by messages, but by exception types too.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org