You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Oleksiy Sayankin (JIRA)" <ji...@apache.org> on 2018/04/02 09:50:00 UTC

[jira] [Commented] (HIVE-18115) Fix schema version info for Hive-2.3.2

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

Oleksiy Sayankin commented on HIVE-18115:
-----------------------------------------

[~vihangk1] wrote:

{quote}
I looked into the schema tool tests in the hope of finding that a test that is broken but I found surprisingly, that this error should not happen in the first place in 2.3.2 (and 2.3.1 as well). MetaStoreSchemaInfo.getHiveSchemaVersion() which is used to find the version of Hive from the binaries should return 2.3.0 and it should match with the schema version in the database which is also 2.3.0 from the init files.

MetaStoreSchemaInfo.getHiveSchemaVersion() gets the shortVersion from the HiveVersionAnnotation which is generated in the build time using saveVersion.sh and it injects the hive version from pom.xml's property which is <hive.version.shortname>2.3.0</hive.version.shortname> for the 2.3.2 release.
{quote}

Agree. The root cause was in that I mistakenly changed

{code}
<hive.version.shortname>2.3.0</hive.version.shortname>
{code}

to

{code}
<hive.version.shortname>2.3.2</hive.version.shortname>
{code}

thinking it as a typo in {{pom.xml}}, because the release version was 2.3.2. After that I had the exception 

{code}
Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Hive Schema version 2.3.2 does not match metastore's schema version 2.3.0 Metastore is not upgraded or corrupt
{code}

which in its own turn forced me to find out the fix:

{code}
  private static final Map<String, String> EQUIVALENT_VERSIONS =
    ImmutableMap.<String, String>builder()
      .put("0.13.1", "0.13.0")
      .put("1.0.0", "0.14.0")
      .put("1.0.1", "1.0.0")
      .put("1.1.1", "1.1.0")
      .put("1.2.1", "1.2.0")
      .put("2.3.2", "2.3.0")
      .build();
{code}

Well guys, this is my mistake and my fault. Sorry :-(.

> Fix schema version info for Hive-2.3.2
> --------------------------------------
>
>                 Key: HIVE-18115
>                 URL: https://issues.apache.org/jira/browse/HIVE-18115
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 2.3.1, 2.3.2
>            Reporter: Oleksiy Sayankin
>            Assignee: Oleksiy Sayankin
>            Priority: Minor
>             Fix For: 2.4.0
>
>         Attachments: HIVE-18115.02-branch-2.patch, HIVE-18115.1.patch
>
>
> Error while starting HiveMeta
> {code}
> Caused by: org.apache.hadoop.hive.metastore.api.MetaException: Hive Schema version 2.3.2 does not match metastore's schema version 2.3.0 Metastore is not upgraded or corrupt
>         at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:7600) ~[hive-exec-2.3.2.jar:2.3.2]
>         at org.apache.hadoop.hive.metastore.ObjectStore.verifySchema(ObjectStore.java:7563) ~[hive-exec-2.3.2.jar:2.3.2]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_141]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_141]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
>         at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:101) ~[hive-exec-2.3.2.jar:2.3.2]
>         at com.sun.proxy.$Proxy23.verifySchema(Unknown Source) ~[?:?]
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMSForConf(HiveMetaStore.java:591) ~[hive-exec-2.3.2.jar:2.3.2]
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:584) ~[hive-exec-2.3.2.jar:2.3.2]
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:651) ~[hive-exec-2.3.2.jar:2.3.2]
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:427) ~[hive-exec-2.3.2.jar:2.3.2]
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_141]
>         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_141]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_141]
>         at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_141]
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) ~[hive-exec-2.3.2.jar:2.3.2]
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) ~[hive-exec-2.3.2.jar:2.3.2]
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:79) ~[hive-exec-2.3.2.jar:2.3.2]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)