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?



-- 
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]


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

Reply via email to