Could not reproduced that issue on Cloudera quickstart VM.
I’ve created an HDFS directory with 10,000 files.
I’ve create external table from within beeline.
The creation was immediate.
Dudu
-------------------------------------------------------------------
bash
-------------------------------------------------------------------
mkdir files_10k
awk 'BEGIN{for (i=1;i<=10000;++i){print i>"./files_10k/f"i".txt"}}'
hdfs dfs -put files_10k /tmp
-------------------------------------------------------------------
beeline
-------------------------------------------------------------------
> create external table files_10k (i int) row format delimited fields
> terminated by '\t' location '/tmp/files_10k';
No rows affected (0.282 seconds)
> select * from files_10k;
10,000 rows selected (27.986 seconds)
From: Margus Roo [mailto:[email protected]]
Sent: Tuesday, May 10, 2016 11:26 PM
To: [email protected]
Subject: Re: Create external table
Hi again
I opened hive (an old client)
And exactly the same create external table .... location [paht in hdfs to place
where are loads of files] works and the same DDL does not work via beeline.
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
+372 51 48 780
On 10/05/16 23:03, Margus Roo wrote:
Hi
Can someone explain or provide documentation how Hive creates external tables?
I have problem with creating external table in case I am pointing location in
hdfs in to directory where are loads of files. Beeline just hangs or there will
be other errors.
In case I point location in to the empty directory then hive creates table.
So does hive looks into files during creating external table?
I can not find any documentation explaining it.
--
Margus (margusja) Roo
http://margus.roo.ee
skype: margusja
+372 51 48 780