[
https://issues.apache.org/jira/browse/HIVE-26985?focusedWorklogId=843168&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-843168
]
ASF GitHub Bot logged work on HIVE-26985:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Feb/23 10:56
Start Date: 02/Feb/23 10:56
Worklog Time Spent: 10m
Work Description: kgyrtkirk commented on code in PR #4002:
URL: https://github.com/apache/hive/pull/4002#discussion_r1094363651
##########
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:
sure; I've copied almost the same message to other places... :)
Issue Time Tracking
-------------------
Worklog Id: (was: 843168)
Time Spent: 40m (was: 0.5h)
> 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: 40m
> 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)