Wednesday, 2 May 2012

Misc Hive notes


Hive from the Command prompt

Read how to run from command prompt

Get info re hive options by running hive -h

From within hive, use:
source FILE

Run a hive program from shell or command line using: hive -f

Example shell script calling hive directly.

while [ 1 ]
  hive -e "select count(*) from mytable where id = $RANDOM"

Hive UDFs

Write own Hive UDF

Join optimisation hints

Check out the join optimisation hints for Hive queries in this article.

Setting in hive

The first two did not work for me.
The third did.

hive> SET"-server -Xmx512M"
hive> SET" -Xmx512M";
hive> SET; 

No comments: