Support Questions
Find answers, ask questions, and share your expertise

Custom properties configuration in Hive after ranger setup

Custom properties configuration in Hive after ranger setup

Expert Contributor

We installed ranger in one of our environment. While testing jobs we found some problem. How do we set these parameters in beeline at runtime ? We are facing this error

Error: Error while processing statement: Cannot modify default_timestamp at runtime. It is not in list of params that are allowed to be modified at runtime (state=42000,code=1)


These are our sample custom parameters.

SET airflow_cluster=${env:CLUSTER}; 
SET default_date=unix_timestamp('1970-01-01 00:00:00');
SET default_timestamp=CAST('1970-01-01 00:00:00' AS TIMESTAMP);
SET default_future_date=unix_timestamp('2099-12-31 00:00:00');We get these errors when we set these parameters.

0: jdbc:hive2://usw2dbdpmn01:10000/> SET default_timestamp=CAST('1970-01-01 00:00:00' AS TIMESTAMP);
Error: Error while processing statement: Cannot modify default_timestamp at runtime. It is not in list of params that are allowed to be modified at runtime (state=42000,code=1)
Different jobs will have different custom properties and gets loaded at runtime.
How to fix the problem and what properties needs to be modified ?
2 REPLIES 2

Re: Custom properties configuration in Hive after ranger setup

Contributor

@Anandha L Ranganathan if you are using ambari you will be able to add a new custom hive-site property as below

11201-screen-shot-2017-01-06-at-43709-pm.png

else you should be able to edit hive-site.xml and add the same property which would allow set parameters starting with default

    <property>
      <name>hive.security.authorization.sqlstd.confwhitelist.append</name>
      <value>|default.*</value>
    </property>

Let me know if this resolves the issue

Re: Custom properties configuration in Hive after ranger setup

Contributor

@Anandha L Ranganathan Like Chethana suggested, you have to add the properties to "hive.security.authorization.sqlstd.confwhitelist.append". You may also refer to https://community.hortonworks.com/content/supportkb/48746/changing-hive-properties-in-beeline-gives-...