You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/11/03 13:45:00 UTC

[jira] [Work logged] (HIVE-24173) notification cleanup interval value changes depending upon replication enabled or not.

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

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

                Author: ASF GitHub Bot
            Created on: 03/Nov/20 13:44
            Start Date: 03/Nov/20 13:44
    Worklog Time Spent: 10m 
      Work Description: aasha commented on a change in pull request #1593:
URL: https://github.com/apache/hive/pull/1593#discussion_r516437630



##########
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:
       // 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.
   
   See if this is used later or its just a one time thing. Then you can go ahead without setting in conf I think. 

##########
File path: standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
##########
@@ -991,6 +992,10 @@ public static ConfVars getMetaConf(String name) {
         "hive.exec.copyfile.maxsize", 32L * 1024 * 1024 /*32M*/,
         "Maximum file size (in bytes) that Hive uses to do single HDFS copies between directories." +
             "Distributed copies (distcp) will be used instead for bigger files so that copies can be done faster."),
+    REPL_EVENT_DB_LISTENER_TTL("metastore.repl.event.db.listener.timetolive",

Review comment:
       REPL_EVENT_DB_LISTENER_TTL is set to 10days, then REPLCMRETIAN also should be 10 days.




----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 506769)
    Time Spent: 1h  (was: 50m)

> notification cleanup interval value changes depending upon replication enabled or not.
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-24173
>                 URL: https://issues.apache.org/jira/browse/HIVE-24173
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Arko Sharma
>            Assignee: Arko Sharma
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Currently we use hive.metastore.event.db.listener.timetolive to determine how long the events are stored in rdbms backing hms. We should have another configuration for the same purpose in context of replication so that we have longer time configured for that otherwise we can default to a 1 day.
> hive.repl.cm.enabled can be used to identify if replication is enabled or not. if enabled use the new configuration property to determine ttl for events in rdbms else use hive.metastore.event.db.listener.timetolive for ttl.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)