[ 
https://issues.apache.org/jira/browse/IMPALA-14955?focusedWorklogId=1019064&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1019064
 ]

ASF GitHub Bot logged work on IMPALA-14955:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/May/26 01:13
            Start Date: 07/May/26 01:13
    Worklog Time Spent: 10m 
      Work Description: Copilot commented on code in PR #89:
URL: https://github.com/apache/impala/pull/89#discussion_r3198400692


##########
be/src/util/hdfs-util.cc:
##########
@@ -51,6 +51,10 @@ string GetHdfsErrorMsg(const string& prefix, const string& 
file) {
   if (root_cause != nullptr) {
     ss << "\nRoot cause: " << root_cause;
   }
+  char* stack_trace = hdfsGetLastExceptionStackTrace();
+  if (stack_trace != nullptr) {
+    ss << "\nStack trace:\n" << stack_trace;
+  }

Review Comment:
   GetHdfsErrorMsg now appends libhdfs exception stack trace (and previously 
also appended the root cause), but the function’s documentation still describes 
it as only prefix/file + errno. Please update the API comment (in hdfs-util.h) 
so callers know the returned message may include multi-line Java exception 
details.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 1019064)
    Time Spent: 20m  (was: 10m)

> Include libhdfs Java stack trace in HDFS error messages
> -------------------------------------------------------
>
>                 Key: IMPALA-14955
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14955
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Siyao Meng
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to