Skip to content

[WIP] HIVE-29563: Iceberg REST Catalog's error logs are too verbose#6425

Draft
okumin wants to merge 2 commits intoapache:masterfrom
okumin:HIVE-29563-rest-logging
Draft

[WIP] HIVE-29563: Iceberg REST Catalog's error logs are too verbose#6425
okumin wants to merge 2 commits intoapache:masterfrom
okumin:HIVE-29563-rest-logging

Conversation

@okumin
Copy link
Copy Markdown
Contributor

@okumin okumin commented Apr 12, 2026

What changes were proposed in this pull request?

Stop logging every client-side error, i.e., 40x errors.

https://issues.apache.org/jira/browse/HIVE-29563

Why are the changes needed?

As explained in HIVE-29563, the current REST API prints the entire stack trace on every error.

apache/iceberg has the same problem and sent a patch, but it has not been reviewed: apache/iceberg#14908

Does this PR introduce any user-facing change?

It includes a change for HMS administrators.

How was this patch tested?

standalone-metastore/packaging/src/docker/build.sh -repo local
docker run --rm --name hive-standalone-metastore \
  -p 9083:9083 \
  -p 9001:9001 \
  local/hive:standalone-metastore-4.3.0-SNAPSHOT
curl -i http://localhost:9001/iceberg/v1/namespaces/default/tables/does_not_exist

// The caller is responsible for closing the underlying catalog backing this REST catalog.
response.setStatus(error.code());
RESTObjectMapper.mapper().writeValue(response.getWriter(), error);
return null;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RESTServerCatalogAdapter on apache/iceberg extends a RESTClient. I don't know the exact reason. The trick is used in some integration tests.
Anyway, as our adapter never behaves as a client, I removed the dependency on RESTClient. As a good side effect, this change ensures only a single path invokes RESTServerCatalogAdapter#execute and allows us to simplify the implementation.

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants