Hive Metastore corrupt

If the Hive Metastore is corrupt, you can perform specific steps to restore it.

  1. On the node where the database for Hive Metastore resides, create databases you want to restore. For example:
    $ mysql -u hiveuser -p -e "create database <hive_db_schema_name>;"
  2. Restore each Metastore database from the dump you created. For example:
     $ mysql -u hiveuser -p <hive_db_schema_name> < </path/to/dump_file>
  3. Reconfigure Hive Metastore if necessary. Reconfiguration might be necessary if the upgrade fails. Contacting Cloudera Support for help with reconfiguration is recommended. Alternatively, in intermediate bits, set key=value commands on the command line to configure Hive Metastore.