1

Initially I create a Hive external table following location

hdfs://user/temp2

and then I altered the location to following.

hdfs://user/temp3

Now even after running MSCK repair table my table is pointing to old location (hdfs://user/temp2)

The table is dynamically partitioned.

leftjoin
  • 36,950
  • 8
  • 57
  • 116
AnuC
  • 23
  • 3

1 Answers1

2

The thing is your table is partitioned and partitions have their own old locations. For external table the easiest way is to drop and create table + repair table, this will create partitions on top of new location subdirectories.

Steps to be done are:

DROP TABLE abc;

CREATE EXTERNAL TABLE abc ... location 'hdfs://user/temp3';

MSCK REPAIR TABLE abc;
leftjoin
  • 36,950
  • 8
  • 57
  • 116