hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vihang Karajgaonkar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-17788) MetastoreConf not properly handling variable interpolation in config values
Date Mon, 27 Aug 2018 17:59:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-17788?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594039#comment-16594039
] 

Vihang Karajgaonkar commented on HIVE-17788:
--------------------------------------------

Hi [~alangates] I noticed this [comment|https://github.com/apache/hive/blob/master/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java#L480] which
mentions this JIRA.

// Now, we need to look for any values that the user set that MetastoreConf doesn't know about.
// TODO Commenting this out for now, as it breaks because the conf values aren't getting properly
// interpolated in case of variables. See HIVE-17788.
/*
for (Map.Entry<String, String> e : conf) {
 if (e.getKey().startsWith("datanucleus.") || e.getKey().startsWith("javax.jdo.")) {
 // We have to handle this differently depending on whether it is a value known to
 // MetastoreConf or not. If it is, we need to get the default value if a value isn't
 // provided. If not, we just set whatever the user has set.
 Object prevVal = prop.setProperty(e.getKey(), e.getValue());
 if (LOG.isDebugEnabled() && MetastoreConf.isPrintable(e.getKey())) {
 LOG.debug("Overriding " + e.getKey() + " value " + prevVal
 + " from jpox.properties with " + e.getValue());
 }
 }
}
*/

It looks like by commenting out the above for loop we would be breaking HIVE-6990 Any plans
on fixing this? Let me know if you need any help from my side. Is it enough to duplicate {{HiveConf.getConfSystemProperties}}
method in MetaStoreConf to re-enable this?

cc [~sershe]

> MetastoreConf not properly handling variable interpolation in config values
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-17788
>                 URL: https://issues.apache.org/jira/browse/HIVE-17788
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 3.0.0
>            Reporter: Alan Gates
>            Assignee: Alan Gates
>            Priority: Major
>
> HiveConf allows the user to put System properties into values in the conf file, which
will later be interpolated at read time.  For example:
> {code}
> <property>
>   <name>hadoop.tmp.dir</name>
>   <value>${test.tmp.dir}/hadoop-tmp</value>
>   <description>A base for other temporary directories.</description>
> </property>
> {code}
> The value for test.tmp.dir is read from the System properties at runtime.
> MetastoreConf is instead returning the uninterpolated value.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message