1

I would like to know where the hive-site.xml file configuration is in a Cloudera distribution.

Mainly because I would like to know where I can find out properties like:

hive.execution.engine=mr
hive.enforce.bucketing=false
hive.enforce.bucketmapjoin=false
hive.enforce.sorting=false

Maybe because I could want to overwrite some of them.

I know I can overwrite them in the Hive shell, but that is only for the current session.

Or I could create a .hiverc file to initialize Hive overwriting some properties.

But I would like to know where the properties are in Cloudera distribution.

I was trying this:

$ cd /
$ sudo find -name hive-site.xml

./etc/impala/conf.dist/hive-site.xml
./etc/spark/conf.dist/hive-site.xml
./etc/hive/conf.dist/hive-site.xml

$ view /etc/impala/conf.dist/hive-site.xml
$ view /etc/spark/conf.dist/hive-site.xml
$ view /etc/hive/conf.dist/hive-site.xml

but in these files I don't see such properties

Maybe cloudera is using other properties file.

May someone help me?

Thanks in advance

Regards.

Chema
  • 2,748
  • 2
  • 13
  • 24

1 Answers1

2

The default values for all properties are defined in the source code of Hive. The configuration files provide means to override these default values.

But if the services are installed using Cloudera Manager, then modify the configurations using the cloudera manager user interface only. CM persists the configurations in its CM database and any changes made to the configuration files will not be considered.

If the components are manually installed using Cloudera parcels and if you want to override any configuration property, use the corresponding configuration file under /etc/<component>/conf/.

There used to be a file called hive-default.xml.template (not sure if that file is still being shipped in the package) which had all the hive properties along with their default values. It was meant only for reference, modifying the values in this file does not take effect.

franklinsijo
  • 17,784
  • 4
  • 45
  • 63
  • Thanks for your answer but it didn't work for me. When I add a property in /etc/hive/conf.dist/hive-site.xml hive throws an exception, however beeline is still working. I only get it adding the property in the .hiverc file. – Chema Apr 18 '20 at 10:13
  • on the other hand, if I add a property in .hiverc file it doesn't affect at beeline, I think them manage different property files. – Chema Apr 18 '20 at 10:15
  • If I remember correctly, .hiverc is only for hive shell. what exception did you get on adding to hive-site.xml, and what did you add? – franklinsijo Apr 18 '20 at 10:24
  • Hi! I get this error when I start hive: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tez/dag/api/SessionNotRunning and I only added this property: hive.execution.engine tex – Chema Apr 18 '20 at 10:31
  • Is it a typo here or you have added `tex` instead of `tez`? – franklinsijo Apr 18 '20 at 10:32
  • It's a typo, sorry, I mean hive.execution.engine tez – Chema Apr 18 '20 at 10:33
  • 1
    If these services are managed via cloudera manager, updating the configuration files will not work. CM persists the configurations in its database. You have to make the changes in the CM and restart the services. These files come into picture if cloudera parcels are managed without CM – franklinsijo Apr 18 '20 at 10:33
  • Modify your solution an add last comment – Chema Apr 18 '20 at 10:36