Skip to main content
knarendran
Gold ⭐️
Apr 1, 2017 5:20 AM UTC

Hive MSCK repair

  • Oct 5, 2026 9:03 AM UTC
  • 4 replies
  • 21842 views
  • Translate All

Issue:

Trying to run "msck repair table <tablename>" gives the below error

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. null

Resolution:

The above error occurs when hive.mv.files.thread=0, increasing the value of the parameter to 15 fixes the issue

This is a known bug

4 replies

hosako
Gold ⭐️
Apr 3, 2017 8:50 AM UTC

Would you mind adding Apache Jira link?

Translate
abennett
Silver ⭐️⭐️
Apr 5, 2017 9:12 AM UTC

That bug link won't work unless one is a HW employee or contractor.

The real issues linked to this internal BUG are the following Apache issues:

https://issues.apache.org/jira/browse/HIVE-15803

https://issues.apache.org/jira/browse/HIVE-15879

https://issues.apache.org/jira/browse/HIVE-16014

https://issues.apache.org/jira/browse/HIVE-16086

Hope that helps!

Translate
Gold ⭐️⭐️
Feb 28, 2018 7:07 PM UTC

Workaround if you have spark-sql: spark-sql -e "msck repair table <tablename>".

it works for me all the time.

hope this helps!

Translate
badrie_leonarda
Silver ⭐️
Dec 5, 2018 4:01 PM UTC

Using the console this worked:

user@sandbox:~$ hive --hiveconf hive.msck.path.validation=ignore
hive> use mydatabase;
hive> msck repair table mytable;

Translate