nsivabalan commented on code in PR #19033:
URL: https://github.com/apache/hudi/pull/19033#discussion_r3643375058


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HoodieHiveSyncClient.java:
##########
@@ -597,6 +642,17 @@ public void deleteLastReplicatedTimeStamp(String 
tableName) {
   public void close() {
     try {
       ddlExecutor.close();

Review Comment:
   Fixed in 9e35ec8 — partitionClientPool.close() and Hive.closeCurrent() now 
run in a finally, so they still execute even if ddlExecutor.close() throws.



##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HoodieHiveSyncClient.java:
##########
@@ -124,7 +137,10 @@ public HoodieHiveSyncClient(HiveSyncConfig config, 
HoodieTableMetaClient metaCli
             ddlExecutor = new HMSDDLExecutor(config, this.client);
             break;
           case HIVEQL:
-            ddlExecutor = new HiveQueryDDLExecutor(config, this.client);
+            this.partitionDriverPool = maybeBuildHiveDriverPool(config);

Review Comment:
   Fixed in 9e35ec8 — extracted buildHiveQueryDDLExecutor(config), which builds 
partitionDriverPool, partitionClientPool, and the HiveQueryDDLExecutor as one 
sequence and closes whichever pool(s) were already built if any later step 
throws, before rethrowing. Same pattern applied to both call sites (the 
explicit HIVEQL branch and the legacy default-mode branch).



##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HoodieHiveSyncClient.java:
##########
@@ -86,6 +90,15 @@ public class HoodieHiveSyncClient extends HoodieSyncClient {
   private final Map<String, Table> initialTableByName = new HashMap<>();
   DDLExecutor ddlExecutor;
   private IMetaStoreClient client;
+  // Non-null only when HIVE_SYNC_BATCHING_ENABLED and sync mode is HIVEQL. 
Owned by
+  // this class; closed in close() before Hive.closeCurrent(). 
HiveQueryDDLExecutor
+  // uses it only for DROP (Hive Thrift, not Hive Driver) — see 
IMetaStoreClientPool
+  // javadoc.
+  private IMetaStoreClientPool partitionClientPool;

Review Comment:
   Fixed in 9e35ec8 — partitionClientPool is now Option<IMetaStoreClientPool>, 
matching partitionDriverPool.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to