From 626c98135d46af4d41ca25dee3dbbb6671cfdeb5 Mon Sep 17 00:00:00 2001 From: yufeigu Date: Mon, 2 May 2022 12:36:01 -0700 Subject: [PATCH 1/2] Log the new metadata location in commit. --- .../main/java/org/apache/iceberg/hive/HiveTableOperations.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java b/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java index 1303fd15d89b..8b483843a8cb 100644 --- a/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java +++ b/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveTableOperations.java @@ -311,6 +311,8 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) { } finally { cleanupMetadataAndUnlock(commitStatus, newMetadataLocation, lockId, tableLevelMutex); } + + LOG.info("Committed to table {} with the new metadata location {}", fullName, newMetadataLocation); } @VisibleForTesting From c2e6ed0fbe07eb749aaace0bc9ae99b6011dc57f Mon Sep 17 00:00:00 2001 From: yufeigu Date: Tue, 3 May 2022 17:22:12 -0700 Subject: [PATCH 2/2] Resolve the comments --- .../java/org/apache/iceberg/hadoop/HadoopTableOperations.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java b/core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java index c68ee929deea..f2347a9b932f 100644 --- a/core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java +++ b/core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java @@ -157,6 +157,8 @@ public void commit(TableMetadata base, TableMetadata metadata) { // this rename operation is the atomic commit operation renameToFinal(fs, tempMetadataFile, finalMetadataFile, nextVersion); + LOG.info("Committed a new metadata file {}", finalMetadataFile); + // update the best-effort version pointer writeVersionHint(nextVersion);