Reply
TS
Contributor
Posts: 84
Registered: ‎02-10-2015

Cannot create table stored as Parquet

[ Edited ]

While I am executing a simple create table command it errors out:

 

create table <table-name-1> stored as parquet as (select * from <table-name-2>)

 

The message is as follows:


ERROR: AnalysisException: Failed to load metadata for table: <table-name-1>
CAUSED BY: TableLoadingException: Failed to load metadata for table: <table-name-1>
CAUSED BY: CatalogException: Failed to create partition:
CAUSED BY: IOException: Incomplete HDFS URI, no host: hdfs://master:8020:8020/user/hive/warehouse/<table-name-1>

 

<Q> Why am I getting the port 8020 twice??

 

BTW, I have been able to come with a work around, as follows:

 

create table <table-name-1> stored as parquet location '/jobs/impala/<table-name-1>' as (select * from <table-name-2>) 

 

 

Cloudera Employee
Posts: 3
Registered: ‎08-11-2014

Re: Cannot create table stored as Parquet

What's your value for the property hive.metastore.warehouse.dir in your cluster?

Explorer
Posts: 13
Registered: ‎04-08-2014

Re: Cannot create table stored as Parquet

Hi

 

I have the same problem in version 2.2.0-cdh5.4.8

My hive.metastore.warehouse in the cluster is: /user/hive/warehouse

 

[node2:21000] > create table test01 as select 1;
Query: create table test01 as select 1
ERROR: AnalysisException: Failed to load metadata for table: test01
CAUSED BY: TableLoadingException: Failed to load metadata for table: test01
CAUSED BY: CatalogException: Failed to create partition: 
CAUSED BY: IOException: Incomplete HDFS URI, no host: hdfs://hd01:8020:8020/user/hive/warehouse/test01

Is it possible that the problem could be the port duplicated in URI?

 

Thanks.

Cloudera Employee
Posts: 3
Registered: ‎08-11-2014

Re: Cannot create table stored as Parquet

That's my first guess. The second colon in the URL you see probably breaks
the parsing code so the path isn't fully read.

Highlighted
Explorer
Posts: 13
Registered: ‎04-08-2014

Re: Cannot create table stored as Parquet

Yes, but where can I change this value?

Announcements