From ffb1faf88162867bc7c8e2ae89e5477524702330 Mon Sep 17 00:00:00 2001 From: Raymond Zhang Date: Mon, 2 Dec 2024 15:48:47 -0800 Subject: [PATCH] spotless --- ...HiveMetadataPreservingTableOperations.java | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/hivelink-core/src/main/java/org/apache/iceberg/hivelink/core/HiveMetadataPreservingTableOperations.java b/hivelink-core/src/main/java/org/apache/iceberg/hivelink/core/HiveMetadataPreservingTableOperations.java index e3b8f9cee..a96fb674b 100644 --- a/hivelink-core/src/main/java/org/apache/iceberg/hivelink/core/HiveMetadataPreservingTableOperations.java +++ b/hivelink-core/src/main/java/org/apache/iceberg/hivelink/core/HiveMetadataPreservingTableOperations.java @@ -195,9 +195,16 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) { ReentrantLock tableLevelMutex = commitLockCache.get(fullName, t -> new ReentrantLock(true)); tableLevelMutex.lock(); try { - LOG.warn("In thread {}, starting to acquire a lock for table {}", Thread.currentThread(), fullName); + LOG.warn( + "In thread {}, starting to acquire a lock for table {}", + Thread.currentThread(), + fullName); lockId = Optional.of(acquireLock()); - LOG.warn("In thread {}, acquired lock id: {} for table {}", Thread.currentThread(), lockId.get(), fullName); + LOG.warn( + "In thread {}, acquired lock id: {} for table {}", + Thread.currentThread(), + lockId.get(), + fullName); // TODO add lock heart beating for cases where default lock timeout is too low. Table tbl; // [LINKEDIN] Instead of checking if base != null to check for table existence, we query @@ -207,9 +214,15 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) { // definition and not create a new definition LOG.warn("In thread {}, checking if table exists {}", Thread.currentThread(), fullName); boolean tableExists = metaClients.run(client -> client.tableExists(database, tableName)); - LOG.warn("In thread {}, checking table exists finishes with result: {}", Thread.currentThread(), tableExists); + LOG.warn( + "In thread {}, checking table exists finishes with result: {}", + Thread.currentThread(), + tableExists); if (tableExists) { - LOG.warn("In thread {}, starting to call getTable: {} from HMS", Thread.currentThread(), fullName); + LOG.warn( + "In thread {}, starting to call getTable: {} from HMS", + Thread.currentThread(), + fullName); tbl = metaClients.run(client -> client.getTable(database, tableName)); LOG.warn("In thread {}, getTable: {} from HMS finished", Thread.currentThread(), fullName); fixMismatchedSchema(tbl); @@ -288,9 +301,16 @@ protected void doCommit(TableMetadata base, TableMetadata metadata) { throw new RuntimeException("Interrupted during commit", e); } finally { - LOG.warn("In thread {}, trying to cleanupMetadataAndUnlock of lock id: {} for table: {}", Thread.currentThread(), lockId, fullName); + LOG.warn( + "In thread {}, trying to cleanupMetadataAndUnlock of lock id: {} for table: {}", + Thread.currentThread(), + lockId, + fullName); cleanupMetadataAndUnlock(commitStatus, newMetadataLocation, lockId, tableLevelMutex); - LOG.warn("In thread {}, cleanupMetadataAndUnlock finishes for table: {}", Thread.currentThread(), fullName); + LOG.warn( + "In thread {}, cleanupMetadataAndUnlock finishes for table: {}", + Thread.currentThread(), + fullName); } }