1
votes

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 ~]$

2

2 Answers

0
votes

Try doing it as hive user:

sudo -uhive hive

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

0
votes

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.