Monday, 14 August 2017

New_4)Hive Interactive Shell Commands:

4)Hive Interactive Shell Commands:

When $HIVE_HOME/bin/hive is run without either the -e or -f option, it enters interactive shell mode.

Note:Use ";" (semicolon) to terminate commands

Function
Hive
Run script inside shell
source file_name
Run ls (dfs) commands
dfs –ls /user
Run ls (bash command) from shell
!ls
Set configuration variables
set mapred.reduce.tasks=32
TAB auto completion
set hive.<TAB>
Show all variables starting with hive
set
Revert all variables
reset
Add jar to distributed cache
add jar jar_path
Show all jars in distributed cache
list jars
Delete jar from distributed cache
delete jar jar_name


Examples:

hive> set mapred.reduce.tasks=32;
hive> set;
hive> select student1.* from student1;
hive> !ls;
hive> dfs -ls;

TAB auto completion :

hive (default)> set hive.cli.print.
hive.cli.print.current.db   hive.cli.print.header


No comments:

Post a Comment

Fundamentals of Python programming

Fundamentals of Python programming: Following below are the fundamental constructs of Python programming: Python Data types Python...