aasha commented on a change in pull request #1593:
URL: https://github.com/apache/hive/pull/1593#discussion_r510170995
##########
File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
##########
@@ -522,6 +522,9 @@ private static void populateLlapDaemonVarsSet(Set<String>
llapDaemonVarsSetLocal
REPLCMINTERVAL("hive.repl.cm.interval","3600s",
new TimeValidator(TimeUnit.SECONDS),
"Inteval for cmroot cleanup thread."),
+ REPL_EVENT_DB_LISTENER_TTL("hive.repl.event.db.listener.timetolive", 10,
new TimeValidator(TimeUnit.DAYS),
Review comment:
this conf is needed only in metastore conf
##########
File path:
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java
##########
@@ -161,6 +163,13 @@ private static synchronized void init(Configuration conf)
throws MetaException {
}
}
+ @VisibleForTesting
+ public static synchronized void resetCleaner(HiveConf conf) throws Exception{
+ cleaner.stopRun();
Review comment:
This will still keep the cleaner thread running.
##########
File path:
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java
##########
@@ -184,8 +193,25 @@ public void onConfigChange(ConfigChangeEvent tableEvent)
throws MetaException {
TimeUnit.SECONDS);
MetastoreConf.setTimeVar(getConf(),
MetastoreConf.ConfVars.EVENT_DB_LISTENER_TTL, time,
TimeUnit.SECONDS);
- cleaner.setTimeToLive(MetastoreConf.getTimeVar(getConf(),
- MetastoreConf.ConfVars.EVENT_DB_LISTENER_TTL, TimeUnit.SECONDS));
+ boolean isReplEnabled = MetastoreConf.getBoolVar(getConf(),
ConfVars.REPLCMENABLED);
+ if(!isReplEnabled){
+ cleaner.setTimeToLive(MetastoreConf.getTimeVar(getConf(),
ConfVars.EVENT_DB_LISTENER_TTL,
+ TimeUnit.SECONDS));
+ }
+ } else if (key.equals(ConfVars.REPL_EVENT_DB_LISTENER_TTL.toString()) ||
+ key.equals(ConfVars.REPL_EVENT_DB_LISTENER_TTL.getHiveName())) {
+ // This weirdness of setting it in our conf and then reading back does
two things.
+ // One, it handles the conversion of the TimeUnit. Two, it keeps the
value around for
+ // later in case we need it again.
+ long time = MetastoreConf.convertTimeStr(tableEvent.getNewValue(),
TimeUnit.SECONDS,
+ TimeUnit.SECONDS);
+ MetastoreConf.setTimeVar(getConf(),
MetastoreConf.ConfVars.REPL_EVENT_DB_LISTENER_TTL, time,
Review comment:
why are you setting this twice. In line 212 also
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]