Shinichi Yamashita created HIVE-13425:
-----------------------------------------
Summary: Fix partition addition in MSCK REPAIR TABLE command
Key: HIVE-13425
URL: https://issues.apache.org/jira/browse/HIVE-13425
Project: Hive
Issue Type: Bug
Components: Metastore
Affects Versions: 2.0.0
Reporter: Shinichi Yamashita
Assignee: Shinichi Yamashita
Priority: Minor
I create a table in following HiveQL.
{code}
hive> create table example (name string) partitioned by (id int);
{code}
And, I make some directories about this table in HDFS.
{code}
[root@hadoop ~]# hdfs dfs -ls -R /user/hive/warehouse/example
drwxr-xr-x - root hadoop 0 2016-04-05 22:21
/user/hive/warehouse/example/id=1
drwxr-xr-x - root hadoop 0 2016-04-05 22:22
/user/hive/warehouse/example/id=1/id=2
-rw-r--r-- 1 root hadoop 8 2016-04-05 22:22
/user/hive/warehouse/example/id=1/id=2/example.txt
{code}
Next I executed MSCK REPAIR TABLE command and added a partition. And this
result became as follows.
{code}
[root@hadoop ~]# hive -e 'msck repair table example'
OK
Partitions not in metastore: example:id=1/id=2
Repair: Added partition to metastore example:id=1/id=2
Time taken: 1.243 seconds, Fetched: 2 row(s)
[root@hadoop ~]# hive -e 'show partitions example'
OK
id=2
{code}
"id=1" should be a partition, but "id=2" was added. I will fix this problem.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)