If I take a given data directories. The directories contain a data file that is rc format and only contains one character "1".
Create the table over the directories using the following command:
create table j1 (a int) partitioned by (b string) stored as rcfile location '/j1' ;
I add these directories to a table for example j1 using the following commands:
alter table j1 add partition (b = 'part1') location '/j1/part1';
alter table j1 add partition (b = 'part2') location '/j1/part2';
I then do the following command to the first partition:
alter table j1 partition (b = 'part1') concatenate;
Hive changes the partition location from on hdfs
However it does not update the partition location in the metastore and partition is then lost to the table. It is hard to find this out until you start querying your data and notice there is missing data. The table even still shows the partition when you do "show partitions".