Fixing the canary test after upgrading

After upgrading from CDH 6 to CDP, you need to make a change to a table by querying the Hive metastore backend database to run the Hive canary test.

The Hive canary test for Hive-on-Tez fails unless you make the changes described in the following procedure. When you run the test, you get the following error:
org.apache.hadoop.hive.metastore.RetryingHMSHandler: [pool-6-thread-69]: HMSHandler Fatal error: javax.jdo.JDODataStoreException: Exception thrown flush
ing changes to datastore
 at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:543)
NestedThrowablesStackTrace:
java.sql.BatchUpdateException: Unknown column 'MESSAGE_FORMAT' in 'field list'          
  1. Backup the Hive metastore database.
  2. Log into the Hive metastore database.
  3. Use the metastore database.
    USE metastore;
  4. Add a MESSAGE_FORMAT column and modify the data type of MESSAGE in the NOTIFICATION_LOG table.
    ALTER TABLE `NOTIFICATION_LOG` ADD `MESSAGE_FORMAT` varchar(16);
    
    ALTER TABLE `NOTIFICATION_LOG` MODIFY `MESSAGE` longtext;