[ 
https://issues.apache.org/jira/browse/HIVE-26145?focusedWorklogId=761698&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-761698
 ]

ASF GitHub Bot logged work on HIVE-26145:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 25/Apr/22 10:53
            Start Date: 25/Apr/22 10:53
    Worklog Time Spent: 10m 
      Work Description: pvary commented on code in PR #3215:
URL: https://github.com/apache/hive/pull/3215#discussion_r857500634


##########
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java:
##########
@@ -174,12 +174,17 @@ public class DbNotificationListener extends 
TransactionalMetaStoreEventListener
 
   //cleaner is a static object, use static synchronized to make sure its 
thread-safe
   private static synchronized void init(Configuration conf) throws 
MetaException {
-    if (cleaner == null) {
+    long freq = MetastoreConf.getTimeVar(conf, 
MetastoreConf.ConfVars.EVENT_DB_LISTENER_CLEAN_INTERVAL, TimeUnit.MILLISECONDS);
+    if (cleaner == null && freq > 0) {
       cleaner =
           new CleanerThread(conf, RawStoreProxy.getProxy(conf, conf,
               MetastoreConf.getVar(conf, ConfVars.RAW_STORE_IMPL)));
       cleaner.start();
-    }
+      LOG.info("Scheduling notification log cleanup service with " +

Review Comment:
   Nit: Could we use parametrized logging here instead of concatenating the 
strings?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 761698)
    Time Spent: 20m  (was: 10m)

> Disable notification cleaner if interval is zero
> ------------------------------------------------
>
>                 Key: HIVE-26145
>                 URL: https://issues.apache.org/jira/browse/HIVE-26145
>             Project: Hive
>          Issue Type: Sub-task
>          Components: Metastore
>            Reporter: Janos Kovacs
>            Assignee: Janos Kovacs
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Many of the housekeeping/background tasks can be turned off in case of having 
> multiple instances running parallel. 
> Some are controlled via the housekeeping node configuration, others are not 
> started if their frequency is set to zero.
> The DB-Notification cleaner unfortunately doesn't have this functionality 
> which makes all instances to race for the lock on the backend HMS database. 
> Goal is to add change to be able to turn cleaner off in case if there are 
> multiple instances running (be able to bound it to the housekeeping 
> instance).  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to