Posts

Showing posts from 2016

How to add mutiple partition columns to the hive table?

How to add mutiple partition columns to the table in hive? Let us assume our table is partitioned by two columns createtime,loadtime. hive> show partitions account.product; OK createtime=20160801/loadtime=20160808 Now I have data file with loadtime as '20160809' createtime as '20160801' Data Path: /user/jobs/account/product/createtime=20160801/loadtime=20160809/part-m-00000 I want to add above data file with new loadtime as above: Now the query looks like below: hive> ALTER TABLE ACCOUNT.PRODUCT ADD PARTITION(createtime=20160801,loadtime=20160808) hive> LOCATION '/user/jobs/account/product/createtime=20160801/loadtime=20160809'; OK Time taken: 2.1 seconds hive>

CDH 5: Oozie action stuck at PREP state

I have observed oozie action stuck at PREP state when im doing small hadoop jobs. This issue is i came across when i use Cloudera version 5. I found below solution worked for me, Open Oozie job.properties file Change port number for jobtracker  from  jobTracker=localhost:8021 to jobTracker=localhost:8032.