Reply
New Contributor
Posts: 3
Registered: ‎10-09-2017

Tutorial 1 Hive Import run twice without problem?

[ Edited ]

Hi

I ran the tutorial

 sqoop import-all-tables -m 1 --connect jdbc:mysql://quickstart:3306/retail_db --username=retail_dba --password=cloudera --compression-codec=snappy --as-parquetfile --warehouse-dir=/user/hive/warehouse --hive-import

 

TWICE 

and cant tell why the data hasnt been appended. I thought that hadoop doesnt allow the data to go into the same directory twice ?

Also, I thought you need to change thw switch to -overwrite to make it overwrite rather than use import again which would append

 

Not sure what has happened? I ran it the first time on 3rd and the second time on 9th

[cloudera@quickstart ~]$ hadoop fs -ls /user/hive/warehouse
Found 6 items
drwxrwxrwx   - cloudera supergroup          0 2017-10-09 15:15 /user/hive/warehouse/categories
drwxrwxrwx   - cloudera supergroup          0 2017-10-09 15:16 /user/hive/warehouse/customers
drwxrwxrwx   - cloudera supergroup          0 2017-10-09 15:17 /user/hive/warehouse/departments
drwxrwxrwx   - cloudera supergroup          0 2017-10-09 15:18 /user/hive/warehouse/order_items
drwxrwxrwx   - cloudera supergroup          0 2017-10-09 15:19 /user/hive/warehouse/orders
drwxrwxrwx   - cloudera supergroup          0 2017-10-09 15:20 /user/hive/warehouse/products
[cloudera@quickstart ~]$ hadoop fs -ls /user/hive/warehouse/catagories
ls: `/user/hive/warehouse/catagories': No such file or directory
[cloudera@quickstart ~]$ hadoop fs -ls /user/hive/warehouse/categories
Found 4 items
drwxr-xr-x   - cloudera supergroup          0 2017-10-03 15:34 /user/hive/warehouse/categories/.metadata
drwxr-xr-x   - cloudera supergroup          0 2017-10-09 15:15 /user/hive/warehouse/categories/.signals
-rw-r--r--   1 cloudera supergroup       1957 2017-10-09 15:15 /user/hive/warehouse/categories/b1d7eb06-1bbc-4fbe-ba74-a10427edbced.parquet
-rw-r--r--   1 cloudera supergroup       1957 2017-10-03 15:35 /user/hive/warehouse/categories/c78e117e-e550-4a6d-8dca-6e90bb8cd35d.parquet

 

New Contributor
Posts: 2
Registered: ‎11-03-2017

Re: Tutorial 1 Hive Import run twice without problem?

same problem....

 

How can I solve it?

New Contributor
Posts: 2
Registered: ‎11-03-2017

Re: Tutorial 1 Hive Import run twice without problem?

Announcements