[ 
https://issues.apache.org/jira/browse/HIVE-14152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15376627#comment-15376627
 ] 

Lefty Leverenz commented on HIVE-14152:
---------------------------------------

Doc note:  This changes the description of *datanucleus.schema.autoCreateAll*, 
changes the default value and description of 
*hive.metastore.schema.verification*, changes the default value of 
*hive.metastore.schema.verification.record.version*, and removes 
*datanucleus.autoStartMechanismMode*.  The changes need to be documented in the 
wiki for releases 2.1.1 and 2.2.0.

Here are the doc links:

* [Configuration Properties -- datanucleus.schema.autoCreateAll | 
https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-datanucleus.schema.autoCreateAll]
* [Configuration Properties -- hive.metastore.schema.verification | 
https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.metastore.schema.verification]
* [Configuration Properties -- 
hive.metastore.schema.verification.record.version | 
https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.metastore.schema.verification.record.version]
  (_not documented yet for HIVE-9749 but when it is, this link will work_)
* [Configuration Properties -- datanucleus.autoStartMechanismMode | 
https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-datanucleus.autoStartMechanismMode]

Added TODOC2.1.1 and TODOC2.2 labels.

Typo alert:  The new description of *hive.metastore.schema.verification* omits 
the word "metastore" --

bq.  Verify that version information stored in is compatible with one from Hive 
jars.

The original was --

bq.  Verify that version information stored in metastore matches with one from 
Hive jars.

> datanucleus.autoStartMechanismMode should set to 'Ignored' to allow rolling 
> downgrade 
> --------------------------------------------------------------------------------------
>
>                 Key: HIVE-14152
>                 URL: https://issues.apache.org/jira/browse/HIVE-14152
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Daniel Dai
>            Assignee: Thejas M Nair
>              Labels: TODOC2.1.1, TODOC2.2
>             Fix For: 2.2.0, 2.1.1
>
>         Attachments: HIVE-14152.1.patch, HIVE-14152.2.patch, 
> HIVE-14152.3.patch, HIVE-14152.addendum.patch
>
>
> We see the following issue when downgrading metastore:
> 1. Run some query using new tables
> 2. Downgrade metastore
> 3. Restart metastore will complain the new table does not exist
> In particular, constaints tables does not exist in branch-1. If we run Hive 2 
> and create a constraint, then downgrade metastore to Hive 1, datanucleus will 
> complain:
> {code}
> javax.jdo.JDOFatalUserException: Error starting up DataNucleus : a class 
> "org.apache.hadoop.hive.metastore.model.MConstraint" was listed as being 
> persisted previously in this datastore, yet the class wasnt found. Perhaps it 
> is used by a different DataNucleus-enabled application in this datastore, or 
> you have changed your class names.
>       at 
> org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:528)
>       at 
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:788)
>       at 
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:333)
>       at 
> org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:202)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
>       at java.security.AccessController.doPrivileged(Native Method)
>       at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
>       at 
> javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
>       at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
>       at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
>       at 
> org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:377)
>       at 
> org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:406)
>       at 
> org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:299)
>       at 
> org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:266)
>       at 
> org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:76)
>       at 
> org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:136)
>       at 
> org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:60)
>       at 
> org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:69)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:650)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:628)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:677)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:484)
>       at 
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:77)
>       at 
> org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:83)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5905)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5900)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore.startMetaStore(HiveMetaStore.java:6159)
>       at 
> org.apache.hadoop.hive.metastore.HiveMetaStore.main(HiveMetaStore.java:6084)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>       at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> {code}
> Apparently datanucleus cache some trace about the new table and retry to 
> reinstantiate later. This breaks downgrading we shall disable this behavior.
> We need to set "datanucleus.autoStartMechanismMode" to "Ignored" to disable 
> the check since it becomes a norm in downgrading case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to