Support Questions

Find answers, ask questions, and share your expertise

Running multipe Hive Server 2 instances using multiple hive-site.xml files

New Contributor


I know it's possible to run multiple HS2 instances on multiple ports, and I know how to run it manually, but I'm curious is it possible already to specify one config file per instance, and be sure that desired instance will use just that one config file?

So far I know it's possible to specify a folder where hive-site.xml is going to be, but not if it's possible to specify which config file exactly startup script should use?

Didn't find anything in official HWX documentation about this, except that you can run manually HS2 instance on desired port.

Thanks a lot!


@Dejan Menges

You could start the HD2 instance as below with different conf directory:

su hive -c "HIVE_CONF_DIR=/etc/hive/conf/conf.server /usr/hdp/current/hive-server2/bin/hiveserver2 -hiveconf hive.metastore.uris=" " -hiveconf hive.log.dir=/var/log/hive -hiveconf hive.log.file=hiveserver2.log 1>/var/log/hive/hiveserver2.log 2>/var/log/hive/hiveserver2.log &"

Rising Star

@Dejan Menges

You can use Ambari Config Groups to assign an specific configuration to the host where the seconf HS2 lives.

Please take a look at the following doc