zabetak commented on code in PR #3215:
URL: https://github.com/apache/hive/pull/3215#discussion_r857554725
##########
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 =
Review Comment:
The `cleaner` object is accessed in many places in this class and in order
to ensure that we are not going to have a NPE we need to review all calls
carefully. For instance, it seems that configuration changes (`onConfigChange`)
may touch try to update some aspects of the `cleaner` assuming that the latter
one is initialized.
--
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]