dataengref errors

Home / Hive / Metastore

Hive: MetaException: Hive Schema version does not match metastore's schema version

org.apache.hadoop.hive.metastore.api.MetaExceptionHive Schema version 4.2.0 does not match metastore's schema version 3.1.0 Metastore is not upgraded or corrupt

The Hive binaries expect a different metastore database schema than the one installed. This happens after upgrading Hive without upgrading the metastore schema, or when an older client connects directly to a newer metastore database.

Causes · Fixes · Source

Common causes

  1. Hive was upgraded but schematool -upgradeSchema was not run.How to confirm: schematool -dbType <db> -info shows the database schema version below the Hive version.
  2. A client with older Hive libraries (for example Spark with bundled Hive jars) connects to the metastore database directly instead of through the metastore service.How to confirm: The client config has javax.jdo.option.ConnectionURL instead of hive.metastore.uris.

How to fix it

Upgrade the metastore schema with schematool after backing up the database.

schematool -dbType mysql -upgradeSchema

Have other engines connect through the metastore service (hive.metastore.uris) rather than to the database. Do not disable verification to hide the mismatch.

SettingDefaultNote
hive.metastore.schema.verificationtrue

Where the message comes from

Message template in the source: Hive Schema version %s does not match metastore's schema version %s Metastore is not upgraded or corrupt

References

Related errors

Last checked: