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

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

                Author: ASF GitHub Bot
            Created on: 02/Feb/23 10:38
            Start Date: 02/Feb/23 10:38
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk commented on code in PR #4002:
URL: https://github.com/apache/hive/pull/4002#discussion_r1094344239


##########
common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:
##########
@@ -6331,29 +6333,76 @@ public ZooKeeperHiveHelper getZKConfig() {
       .trustStorePassword(trustStorePassword).build();
   }
 
-  public HiveConf() {
+  public static HiveConf create() {
+    HiveConf conf = new HiveConf();
+    if (conf.isPropertyTrackingEnabled()) {
+      return new TrackedHiveConf();
+    }
+    return conf;
+  }
+
+  public static HiveConf create(Class<?> cls) {
+    HiveConf conf = new HiveConf(cls);
+    if (conf.isPropertyTrackingEnabled()) {
+      return new TrackedHiveConf(cls);
+    }
+    return conf;
+  }
+
+  public static HiveConf create(Configuration other, Class<?> cls) {
+    if (other.getBoolean(ConfVars.HIVE_CONF_PROPERTY_TRACKING.varname, false)) 
{
+      return new TrackedHiveConf(other, cls);
+    }
+    return new HiveConf(other, cls);
+  }
+
+  public static HiveConf create(HiveConf other) {
+    if (other.isPropertyTrackingEnabled()) {
+      return new TrackedHiveConf(other);
+    }
+    return new HiveConf(other);
+  }
+
+  private boolean isPropertyTrackingEnabled() {
+    return getBoolVar(ConfVars.HIVE_CONF_PROPERTY_TRACKING);
+  }
+
+  /**
+   * @deprecated This method will become private eventually; Use {@link 
#create()} instead.
+   */
+  @Deprecated
+  protected HiveConf() {

Review Comment:
   I think there are other options than making HiveConf protected - and I don't 
think its worth to break all 3rd party extensions for a rarely used debug 
feature (-1)
   
   
https://issues.apache.org/jira/browse/HIVE-26985?focusedCommentId=17683330&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17683330





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

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

> Create a trackable hive configuration object
> --------------------------------------------
>
>                 Key: HIVE-26985
>                 URL: https://issues.apache.org/jira/browse/HIVE-26985
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: hive.log
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> During configuration-related investigations, I want to be able to easily find 
> out when and how a certain configuration is changed. I'm looking for an 
> improvement that simply logs if "hive.a.b.c" is changed from "hello" to 
> "asdf" or even null and on which thread/codepath.
> Not sure if there is already a trackable configuration object in hadoop that 
> we can reuse, or we need to implement it in hive.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to