Skip to content

[#11352] fix(glue): improve error logging for Iceberg metadata loading#11359

Open
xxubai wants to merge 2 commits into
apache:mainfrom
xxubai:fix/glue-catalog-load-table-logs
Open

[#11352] fix(glue): improve error logging for Iceberg metadata loading#11359
xxubai wants to merge 2 commits into
apache:mainfrom
xxubai:fix/glue-catalog-load-table-logs

Conversation

@xxubai
Copy link
Copy Markdown
Contributor

@xxubai xxubai commented Jun 2, 2026

What changes were proposed in this pull request?

This PR updates the Glue catalog warning when loading Iceberg metadata fails.

The warning no longer says that partitioning and sort order information may be incomplete. Instead, it reports the Iceberg metadata load failure directly and keeps the original exception in the stacktrace, so missing metadata.json files are easier to diagnose.

This PR also adds a regression test to ensure that a table returned after Iceberg metadata loading fails still keeps its Glue operation context.

Why are the changes needed?

The previous warning was misleading when the real root cause was a missing Iceberg metadata file, for example an S3 NoSuchKeyException for metadata/*.metadata.json. It made the issue look like a partition or sort-order compatibility problem.

Fix: #11352

Does this PR introduce any user-facing change?

Yes. The Glue catalog warning message for Iceberg metadata loading failures is changed.

No API or configuration changes are introduced.

How was this patch tested?

  • ./gradlew :catalogs:catalog-glue:test --tests org.apache.gravitino.catalog.glue.TestGlueCatalogOperationsForIceberg -PskipITs
  • ./gradlew :catalogs:catalog-glue:test -PskipITs

@xxubai xxubai marked this pull request as ready for review June 2, 2026 10:06
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Code Coverage Report

Overall Project 66.81% -0.11% 🟢
Files changed 56.89% 🔴

Module Coverage
aliyun 1.72% 🔴
api 46.82% 🟢
authorization-common 85.96% 🟢
aws 3.66% -0.58% 🔴
azure 2.47% 🔴
catalog-common 10.04% 🔴
catalog-fileset 80.33% 🟢
catalog-glue 66.67% +3.09% 🟢
catalog-hive 79.55% 🟢
catalog-jdbc-clickhouse 80.02% 🟢
catalog-jdbc-common 45.31% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.29% 🟢
catalog-jdbc-starrocks 78.51% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 44.89% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.74% 🟢
catalog-lakehouse-paimon 79.29% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.91% 🟢
common 49.99% 🟢
core 82.48% 🟢
filesystem-hadoop3 76.97% 🟢
flink 0.0% 🔴
flink-common 41.2% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 53.26% 🟢
iceberg-common 56.75% -6.1% 🟢
iceberg-rest-server 72.42% -0.89% 🟢
idp-basic 85.99% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.83% 🔴
lance-rest-server 60.27% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 85.73% 🟢
server-common 73.13% 🟢
spark 32.79% 🔴
spark-common 39.75% 🔴
trino-connector 39.44% 🔴
Files
Module File Coverage
aws S3FileSystemProvider.java 0.0% 🔴
catalog-glue GlueCatalogOperations.java 72.32% 🟢
iceberg-common IcebergCatalogWrapper.java 29.74% 🔴
iceberg-rest-server IcebergCleanupMapperPackageProvider.java 100.0% 🟢
IcebergNamespaceOperationExecutor.java 100.0% 🟢
IcebergTableOperationExecutor.java 95.65% 🟢
IcebergCleanupJobStore.java 93.33% 🟢
IcebergRequestContext.java 80.0% 🟢
RESTService.java 0.0% 🔴

@jerryshao jerryshao requested a review from diqiu50 June 2, 2026 11:46
}

@Test
void testLoadTable_icebergMetadataLoadFailureKeepsGlueOpsContext() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The function name is no match the code style

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.

The other test functions use the same naming convention. But I update this unit test funtion name


@Test
void testLoadTable_icebergMetadataLoadFailureKeepsGlueOpsContext() {
software.amazon.awssdk.services.glue.model.Table rawTable =
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FQN problems

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.

Already import Iceberg table class: import org.apache.iceberg.Table

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug report] Glue catalog logs a misleading warning when Iceberg metadata file is missing

2 participants