IMPALA-14955: Include libhdfs Java stack trace in HDFS error messages#89
IMPALA-14955: Include libhdfs Java stack trace in HDFS error messages#89smengcl wants to merge 1 commit intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Impala’s HDFS/libhdfs error-message helper to include the full Java exception stack trace (when available), improving debuggability for filesystem-client failures (e.g., HCFS/Ozone) where the root cause alone is insufficient.
Changes:
- Append
hdfsGetLastExceptionStackTrace()output toGetHdfsErrorMsg()when libhdfs provides it. - Preserve existing errno + root-cause reporting behavior while enriching failure context.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| char* stack_trace = hdfsGetLastExceptionStackTrace(); | ||
| if (stack_trace != nullptr) { | ||
| ss << "\nStack trace:\n" << stack_trace; | ||
| } |
|
Hi @smengcl, thanks for submitting this PR! We use Gerrit for code review: https://cwiki.apache.org/confluence/display/IMPALA/Using+Gerrit+to+submit+and+review+patches Please submit the patch in Gerrit. Thanks! |
Ah, got it. Thanks |
|
The patch has been moved to Gerrit for review: https://gerrit.cloudera.org/c/24280/ |
https://issues.apache.org/jira/browse/IMPALA-14955
When an HDFS/libhdfs operation fails, Impala currently includes libhdfs root cause output in
GetHdfsErrorMsg(). However, some failures, especially exceptions raised inside filesystem client code, need the full Java stack trace to identify the actual failing path.This change appends
hdfsGetLastExceptionStackTrace()to the HDFS error message when libhdfs provides one.Motivation
We hit an issue earlier when using Ozone (HCFS):
but the actual Java stack trace was not captured in the query/profile error. Including the libhdfs stack trace would be help immensely.