Reply
New Contributor
Posts: 1
Registered: ‎12-11-2015

HIVE create table is not working.

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;

Highlighted
New Contributor
Posts: 1
Registered: ‎04-13-2018

Re: HIVE create table is not working.

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

Champion
Posts: 742
Registered: ‎05-16-2016

Re: HIVE create table is not working.

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 

Contributor
Posts: 50
Registered: ‎02-23-2018

Re: HIVE create table is not working.

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.

Announcements