vamshikrishnakyatham commented on code in PR #14115:
URL: https://github.com/apache/hudi/pull/14115#discussion_r2446115526
##########
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 "Cannot read Hudi table schema - required data file is
missing.\n\n"
+ + "This can happen due to:\n"
+ + " 1. Aggressive cleaner retention compared to query run times\n"
+ + " 2. Manual file deletions (timeline files or data files)\n"
+ + " 3. Concurrent writers without proper locking or configurations
set\n\n"
+ + "Depending on the root cause, mitigation might differ.\n\n"
+ + "Original error: " + errorMessage;
Review Comment:
right, haven't put that properly, updated it
--
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]