nsivabalan commented on code in PR #14115:
URL: https://github.com/apache/hudi/pull/14115#discussion_r2458633168
##########
hudi-sync/hudi-sync-common/src/main/java/org/apache/hudi/sync/common/HoodieSyncClient.java:
##########
@@ -121,10 +121,25 @@ public MessageType getStorageSchema(boolean
includeMetadataField) {
try {
return tableSchemaResolver.getTableParquetSchema(includeMetadataField);
} catch (Exception e) {
- throw new HoodieSyncException("Failed to read schema from storage.", e);
+ throw new HoodieSyncException(buildSchemaReadErrorMessage(e), e);
}
}
+ private String buildSchemaReadErrorMessage(Exception e) {
+ String errorMessage = e.getMessage() != null ? e.getMessage() :
e.getClass().getName();
+ if (e instanceof java.io.FileNotFoundException) {
+ return String.format(
+ "Cannot read Hudi table schema.%n%n"
Review Comment:
hey @yihua : this is specifically when FileNotFoundException. not sure if
the error msg lines up with that.
--
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]