Upgrading MetaStore schema from 0.12.0 to 0.13.0

This topic contains 1 reply, has 1 voice, and was last updated by  Shady Shehata 7 months ago.

  • Creator
  • #57707

    Shady Shehata


    While upgrading HDP 2.0 to HDP 2.1 and Metastore Schema from 0.12 to 0.13 I got the Error: Duplicate column name ‘OWNER_NAME’ (state=42S21,code=1060). The Metastore version is 0.12 in the VERSION Table however the ‘OWNER_NAME’ column in the ‘DBS’ table already exists.

    Here is the detailed error:

    | < HIVE-6386: Add owner filed to database > |
    1 row selected (0.001 seconds)
    0: jdbc:mysql://hadoop.domain> ALTER TABLE DBS ADD OWNER_NAME varchar(128)
    Error: Duplicate column name ‘OWNER_NAME’ (state=42S21,code=1060)
    Closing: 0: jdbc:mysql://hadoop.domain/hive?createDatabaseIfNotExist=true
    org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !!
    org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !!
    at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:242)
    at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:211)
    at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:489)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
    Caused by: java.io.IOException: Schema script failed, errorcode 2
    at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:377)
    at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:350)
    at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:237)
    … 7 more
    *** schemaTool failed ***

    Has anyone run into the same issue? Any idea what is the source of this problem?


Viewing 1 replies (of 1 total)

The forum ‘HDP 2.1 Technical Preview’ is closed to new topics and replies.

  • Author
  • #58367

    Shady Shehata

    How about truncating the old schema 0.12 and installing a fresh one for 0.13

Viewing 1 replies (of 1 total)
Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.