Hive MetaStore Schema Upgrade Failed When Upgrading CDH5

Manually upgrade:

Error logs:

Hive MetaStore Schema Upgrade Failed When Upgrading CDH5 by @sskaje: https://sskaje.me/2014/02/hive-metastore-schema-upgrade-failed-upgrading-cdh5/