Abhay Dandekar
Abhay Dandekar

Reputation: 1300

getting hive configuration from the command line

I wish to retrieve hive configurations from the command line.
Is there any utility like hadoop getconf -confKey for Hive?

i.e.: I wish to retrieve the warehouse dir from hive.xml, get the value and then exit.

Upvotes: 1

Views: 2721

Answers (2)

Venkatesan Muniappan
Venkatesan Muniappan

Reputation: 447

In continuation to what @OneCricketeer gave, once inside the beeline shell, we can issue below-set command to find out what is the value of a given parameter.

set hive.metastore.warehouse.dir;

To list out all the settings we can issue just set as below

set;

Reference: https://stackoverflow.com/a/42239769/5927843

Upvotes: 0

OneCricketeer
OneCricketeer

Reputation: 191983

Use the set command, which will print out the current configuration if not provided a value for the key

hive -e 'set hive.metastore.warehouse.dir;'

Upvotes: 1

Related Questions