msck repair table for custom partition names
msck repair table is used to add partitions that exist in HDFS but not in the hive metastore.
However, it expects the partitioned field name to be included in the folder structure:
Notice the partition name prefixed with the partition. This is necessary. msck repair table wont work if you have data in the following directory structure:
This is kind of a pain. The only solution is to use alter table add partition with location.
ALTER TABLE test ADD PARTITION (year=2015,month=03,day=05) location ‘hdfs:///cool/folder/with/data’;