Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check the settings in hive CLI?

I want to run a hive query in hive command and I want to make it faster, so I ran:

hive:messages> set mapred.job.priority = VERY_HIGH; hive:messages> set
hi = 1;

but I found actually I can set any string to be anything in hive so I wonder is there a way to check all the settings I have made?

like image 432
Eleanor Avatar asked Feb 15 '17 01:02

Eleanor


People also ask

How do I access hive from command line?

Let's connect to hive from the command line. Login into CloudxLab Linux console. Type Hive and wait for Hive command-line interface - CLI to appear. By default, the database with the name "default" is the current database in the hive shell.

What is CLI in hive?

Hive comes with various “One Shot” commands that a user can use through Hive CLI(Command Line Interface) without entering the Hive shell to execute one or more than one query separated by a semicolon.


1 Answers

To list all the settings available in the current Hive session,

hive> SET;

This will list all the

  • System Variables
  • Environment Variables
  • Hadoop, Hive Configurations (User defined and Default properties)
  • Hive Variables set using set, define, hivevar.

It is not possible to filter only a specific set of variables. But to get the value of a particular configuration/variable, use the configuration name as the argument to SET

hive> SET zzzz=123;
hive> SET zzzz;
zzzz=123;
like image 110
franklinsijo Avatar answered Sep 21 '22 00:09

franklinsijo