sankarh commented on a change in pull request #647: HIVE-21766 : Select * 
returns no rows in hive bootstrap from a statior dynamic partitioned managed 
table with Timestamp type as partition column from on prem to WASB even though 
count ( * ) matches
URL: https://github.com/apache/hive/pull/647#discussion_r287776842
 
 

 ##########
 File path: ql/src/java/org/apache/hadoop/hive/ql/DriverContext.java
 ##########
 @@ -234,4 +240,24 @@ public void apply(FileSinkOperator fsOp) {
       }
     }
   }
+
+  // Create a transaction manager for replication flow. In case user has 
provided a different config for REPL load,
+  // this transaction manager will be used to do the transaction operation. 
This is specifically useful when REPL load
+  // is called with different hive metastore uri expecting the transaction 
information to be stored in the specified
+  // metastore.
+  public synchronized HiveTxnManager getReplTxnManager(HiveConf hiveConf) 
throws LockException {
+    if (replTxnManager == null) {
+      replTxnManager = 
TxnManagerFactory.getTxnManagerFactory().getTxnManager(hiveConf);
+      LOG.debug("Created a new replTxnManager : " + replTxnManager);
+    }
+    return replTxnManager;
+  }
+
+  public synchronized void destroyReplTxnManager() {
+    if (replTxnManager != null) {
+      replTxnManager.closeTxnManager();
+      LOG.debug("Destroyed current replTxnManager : " + replTxnManager);
 
 Review comment:
   Shall change it to info log. Helpful to detect any leaks in production.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to