tarak271 commented on code in PR #4970:
URL: https://github.com/apache/hive/pull/4970#discussion_r1448321975


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/service/AcidHouseKeeperService.java:
##########
@@ -38,16 +40,22 @@ public class AcidHouseKeeperService implements 
MetastoreTaskThread {
   private static final Logger LOG = 
LoggerFactory.getLogger(AcidHouseKeeperService.class);
 
   private Configuration conf;
-  private boolean isCompactorEnabled;
   private TxnStore txnHandler;
+  private String serviceName;
+
+  public void setServiceName(String serviceName) {

Review Comment:
   To get the service name printed in log line in run method as we are not 
overriding it in CompactionHouseKeeper.java
      ```
   - LOG.info("Starting to run AcidHouseKeeperService.");
      + LOG.info("Starting to run {}", serviceName);
   ```
   
   And reuse TxnHandler created already in AcidHouseKeeperService as we are 
overriding cleanTheHouse method
   
    ```
   void cleanTheHouse() {
       if (isCompactorEnabled) {
         performTask(getTxnHandler()::removeDuplicateCompletedTxnComponents,
             "Cleaning duplicate COMPLETED_TXN_COMPONENTS entries");
         performTask(getTxnHandler()::purgeCompactionHistory, "Cleaning 
obsolete compaction history entries");
       }
     }
   ```
   
   Please guide me if CompactionHouseKeeper needs to be completely decoupled 
with AcidHouseKeeperService code wise by not implementing inheritance



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to