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... :)
--
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]