Hello Quanlong Huang, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/24280

to look at the new patch set (#3).

Change subject: IMPALA-14955: Include libhdfs Java stack trace in HDFS error 
messages
......................................................................

IMPALA-14955: Include libhdfs Java stack trace in HDFS error messages

When a libhdfs call fails, GetHdfsErrorMsg() currently reports errno and
the Java exception root cause, but it does not include the Java stack
trace that libhdfs also exposes.

For HCFS connection failures, the root cause alone is often not enough
to understand where the error came from in the Java client stack. This
makes coordinator-side failures harder to debug from the Impala error
message alone.

Append hdfsGetLastExceptionStackTrace() to the existing error message
when it is available. This keeps the current behavior for errno and root
cause, and adds the extra Java context only when libhdfs has captured
it.

Testing:
- Manually validated through live impalad on ccycloud-2
- Created a native UDF, rewrote its stored LOCATION to an invalid
  HCFS URI, and ran select default.__impala14955_runtime(7)
- Verified the unpatched error showed Failed to connect to FS,
  Error(255), and Root cause without a Stack trace section
- Verified the patched error showed the same failure plus Stack trace
  and Java frames from the underlying Java client

Before:

2026-05-08 02:49:13 [Exception]  ERROR: Query c04984ff1e7a68e3:6636088e00000000 
failed:
Problem loading UDF '__impala14955_runtime':
Failed to connect to FS: o3fs://nosuchbucket.nosuchvol.ozone1778185853/
Error(255): Unknown error 255
Root cause: OMException: Volume nosuchvol is not found

After:

2026-05-08 04:25:29 [Exception]  ERROR: Query 4b47a57277e156f6:920385c300000000 
failed:
Problem loading UDF '__impala14955_runtime':
Failed to connect to FS: o3fs://nosuchbucket.nosuchvol.ozone1778185853/
Error(255): Unknown error 255
Root cause: OMException: Volume nosuchvol is not found
Stack trace:
VOLUME_NOT_FOUND org.apache.hadoop.ozone.om.exceptions.OMException: Volume 
nosuchvol is not found
        at 
org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.handleError(OzoneManagerProtocolClientSideTranslatorPB.java:761)
        at 
org.apache.hadoop.ozone.om.protocolPB.OzoneManagerProtocolClientSideTranslatorPB.getVolumeInfo(OzoneManagerProtocolClientSideTranslatorPB.java:460)
        at 
org.apache.hadoop.ozone.client.rpc.RpcClient.getVolumeDetails(RpcClient.java:497)
        at 
org.apache.hadoop.ozone.client.ObjectStore.getVolume(ObjectStore.java:185)
        at 
org.apache.hadoop.fs.ozone.BasicOzoneClientAdapterImpl.<init>(BasicOzoneClientAdapterImpl.java:197)
        at 
org.apache.hadoop.fs.ozone.OzoneClientAdapterImpl.<init>(OzoneClientAdapterImpl.java:50)
        at 
org.apache.hadoop.fs.ozone.OzoneFileSystem.createAdapter(OzoneFileSystem.java:107)
        at 
org.apache.hadoop.fs.ozone.BasicOzoneFileSystem.initialize(BasicOzoneFileSystem.java:199)
        at 
org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:3615)
        at 
org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:3716)
        at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:3667)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:557)
        at org.apache.hadoop.fs.FileSystem$1.run(FileSystem.java:277)
        at org.apache.hadoop.fs.FileSystem$1.run(FileSystem.java:274)
        at 
java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
        at java.base/javax.security.auth.Subject.doAs(Subject.java:439)
        at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1964)
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:274)

Change-Id: I67b588a7d8ab11bbbc4480d9abaa6e529c6ec3c2
---
M be/src/util/hdfs-util.cc
M be/src/util/hdfs-util.h
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/80/24280/3
--
To view, visit http://gerrit.cloudera.org:8080/24280
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I67b588a7d8ab11bbbc4480d9abaa6e529c6ec3c2
Gerrit-Change-Number: 24280
Gerrit-PatchSet: 3
Gerrit-Owner: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>

Reply via email to