For the external table in hive if you are adding or dropping partitions and if you try to access the table it will give vertex failure issue.
MSCK will not fix it
MSCK REPAIR TABLE basan.shipment_ext;
show partitions basan.shipment_ext;
//dropping single partition
ALTER TABLE basan.shipment_ext DROP IF EXISTS PARTITION(order_date ='2019-07-15')
//dropping multiple partition
ALTER TABLE basan.shipment_ext DROP IF EXISTS PARTITION(order_date >'2018-07-15')
MSCK will not fix it
MSCK REPAIR TABLE basan.shipment_ext;
To fix this drop the partitions.
show partitions basan.shipment_ext;
//dropping single partition
ALTER TABLE basan.shipment_ext DROP IF EXISTS PARTITION(order_date ='2019-07-15')
//dropping multiple partition
ALTER TABLE basan.shipment_ext DROP IF EXISTS PARTITION(order_date >'2018-07-15')
No comments:
Post a Comment