Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HIVE create table is not working.

HIVE create table is not working.

New Contributor

I am new to hadoop and learning Hive.

I am using VM from Cloudera downloads, While I am creating Table with hive , it is hanging and never creating table. Not sure any configuration is requiered. Here is my create table script. Thanks in advance.

 

hive> use default;
OK
Time taken: 0.064 seconds
hive> create table emp(id INT,name STRING,sal DOUBLE)
    > row format delimited
    > fields terminated by '\t'
    > stored as textfile;

[3]+  Stopped                 hive
[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 emp(id INT,name STRING,sal DOUBLE)
    > row format delimited
    > fields terminated by '\t'
    > STORED AS TEXTFILE;

4 REPLIES 4

Re: HIVE create table is not working.

New Contributor

Hi,

 

Even I am facing same issue.

 

hive>
>
>
> use excercise;
OK
Time taken: 0.386 seconds
hive>
>
>
> show tables;
OK
Time taken: 0.196 seconds
hive> create table if not exists student( Id int, Name String, Department String) row format delimited fields terminated by "," stored as textfile;

 

 

 

Database is getting created, but tables are not getting created and get hanged.

How did you resolved this issue ? Please help.

 

Regards,

Sonali

Re: HIVE create table is not working.

Champion

what it return when you fire show table command .

also it would be good idea to start with hive logs . could you share 

make sure you allocate good amount of ram in the vm for the quickstart 

Re: HIVE create table is not working.

New Contributor

Hi ,

Restart Zookeper from cloudera manager. 

then open terminal

hive hit enter

use <db-name>;

<create table command>;

 

In my case it is working.

 

Thanks ,

Manish Kumar Mishra

 

 

Re: HIVE create table is not working.

Expert Contributor

Hi Nuthi,

 

Try to flush your cache metadata.

 

In Hive console:

 

 >INVALIDATE METADATA [[db_name.]table_name]

 

By default, the cached metadata for all tables is flushed. If you specify a table name, only the metadata for that one table is flushed.

 

 

Regards,

Manu.

Don't have an account?
Coming from Hortonworks? Activate your account here