Hive
  1. Hive
  2. HIVE-4338

Create Table fails after upgrade from 0.9 to 0.10

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: 0.10.0
    • Fix Version/s: None
    • Component/s: Database/Schema
    • Labels:
      None
    • Environment:

      Ubuntu 3.2.0-23-generic #36-Ubuntu on AMD

      Description

      I ran apt-get upgrade on a relatively old cdh installation. Many things were upgraded, among them hadoop, hdfs and hive (from 0.9 to 0.10). After the upgrade, CREATE TABLE started failing. I rebooted the machine, and it is still not working. The error I am receiving is:
      hive> create table ttt(line string);
      FAILED: Error in metadata: MetaException(message:javax.jdo.JDODataStoreException: Error(s) were found while auto-creating/validating the datastore for classes. The errors are printed in the log, and are attached to this exception.
      NestedThrowables:
      java.sql.SQLSyntaxErrorException: In an ALTER TABLE statement, the column 'IS_STOREDASSUBDIRECTORIES' has been specified as NOT NULL and either the DEFAULT clause was not specified or was specified as DEFAULT NULL.)
      FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

        Activity

        Hide
        Tuong Truong added a comment -

        The database upgrade sequence may have some issue... I hit the same issue. However, it's successful when I run the upgrade script (011-HIVE-3649.derby.sql) to upgrade the same column.

        Show
        Tuong Truong added a comment - The database upgrade sequence may have some issue... I hit the same issue. However, it's successful when I run the upgrade script (011- HIVE-3649 .derby.sql) to upgrade the same column.
        Hide
        Harsh J added a comment -

        I don't think this is a bug. The error will pop up if you either don't upgrade your schema, or attempt to use a 0.10 client against a 0.9 db schema. I think we should just mark this closed.

        Show
        Harsh J added a comment - I don't think this is a bug. The error will pop up if you either don't upgrade your schema, or attempt to use a 0.10 client against a 0.9 db schema. I think we should just mark this closed.
        Hide
        Brock Noland added a comment -

        Agreed with Harsh J, it looks like the upgrade script was not run. Closing.

        Show
        Brock Noland added a comment - Agreed with Harsh J, it looks like the upgrade script was not run. Closing.
        Hide
        Tuong Truong added a comment -

        Can you kindly tell me if automatic upgrade is supported? It's true that I pointed Hive 11 to a Hive 9 Derby metastore database. However, based on the error we (originator of the defect and myself) are seeing, it seems some sort of automatic upgrade is being done, but not well. Closing this Jira is fair if auto-upgrade is not supported...

        Thanks...

        Show
        Tuong Truong added a comment - Can you kindly tell me if automatic upgrade is supported? It's true that I pointed Hive 11 to a Hive 9 Derby metastore database. However, based on the error we (originator of the defect and myself) are seeing, it seems some sort of automatic upgrade is being done, but not well. Closing this Jira is fair if auto-upgrade is not supported... Thanks...
        Hide
        Brock Noland added a comment -

        AFAIK auto upgrade is not supported. We specifically publish SQL scripts for this reason. Also a derby metastore is a bad idea in any environment other than development.

        Show
        Brock Noland added a comment - AFAIK auto upgrade is not supported. We specifically publish SQL scripts for this reason. Also a derby metastore is a bad idea in any environment other than development.

          People

          • Assignee:
            Unassigned
            Reporter:
            Geula Vainappel
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development