1

I am trying to create a table in hive using hive CLI of cloudera quickstart vm. The command is stuck and even after a long time does not happen anything. Am i missing anything. Appreciate if anyone can help on this please.

[cloudera@quickstart ~]$ hive

Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.5.0.jar!/hive-log4j.properties WARNING: Hive CLI is deprecated and migration to Beeline is recommended. hive> create table test_dept(department_id int,department_name string); Interrupting... Be patient, this might take some time. Press Ctrl+C again to kill JVM Exiting the JVM [cloudera@quickstart ~]$

Naga
  • 51
  • 3

2 Answers2

0

Try doing it as hive user:

sudo -uhive hive

Even better, try using beeline (hive is deprecated).

facha
  • 11,862
  • 14
  • 59
  • 82
  • Thank you facha but you know i am using sqoop to create a table in hive using --hive-import which is getting stuck. So tried normal create table in hive using hive CLI to check but this is also getting stuck. If the above mentioned by Mr.facha is the solution, how do I use it during sqoop import.Appreciate any help on this please. – Naga Mar 19 '16 at 09:58
  • Appreciate any quick resolution to this issue please. – Naga Mar 31 '16 at 17:09
  • Its so surprising that no one is able to resolve this .. :-), Appreciate any quick solution to this please. – Naga Apr 03 '16 at 16:45
0

Try starting Zookeeper using the Cloudera manager console. Then restart Hive again.

Reason: If you go to the Hive configuration page on cloudera manager, you will find one setting "Zookeeper Service" as having two options ("Zookeeper" and "none"). In my case, it was selected as "Zookeeper" by default. This informs me that Zookeeper should be up for some services to perform well. Hive configuration

Also, if you read the sudo vi /var/log/hive/hadoop-cmf-hive-HIVESERVER2-quickstart.cloudera.log.out log file, you might find Hive server trying to make calls to zookeeper to do a number of things include finding, holding or releasing locks.

In my case, I started zookeeper, restarted Hive and it works now.

okmich
  • 700
  • 5
  • 11