Home Forums HDP 2.1 Technical Preview 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 2 months, 3 weeks ago.

  • Creator
    Topic
  • #57707

    Shady Shehata
    Participant

    Hi,

    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?

    Thanks,

Viewing 1 replies (of 1 total)

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

  • Author
    Replies
  • #58367

    Shady Shehata
    Participant

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

    Collapse
Viewing 1 replies (of 1 total)