Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-1674

DB upgrade from 3.3.0 to trunk fails on postgres

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: 4.1.0
    • Component/s: None
    • Labels:
      None

      Description

      Using a Postgres database created by Oozie 3.3.0 (DB version 1) and upgrading it to the current trunk (DB version 3) fails, even with no jobs in it.

      Creating the 3.3.0 database:

      [oozie@localhost ~]$ oozie-3.3.0/bin/ooziedb.sh create -run
      
      Validate DB Connection
      DONE
      Check DB schema does not exist
      DONE
      Check OOZIE_SYS table does not exist
      DONE
      Create SQL schema
      DONE
      Create OOZIE_SYS table
      DONE
      
      Oozie DB has been created for Oozie version '3.3.0'
      
      
      The SQL commands have been written to: /tmp/ooziedb-4337942956770953237.sql
      

      Upgrading to current trunk:

      [oozie@localhost ~]$ oozie-4.1.0-SNAPSHOT/bin/ooziedb.sh upgrade -run
        setting CATALINA_OPTS="$CATALINA_OPTS -Xmx1024m"
      
      Validate DB Connection
      DONE
      Check DB schema exists
      DONE
      Verify there are not active Workflow Jobs
      DONE
      Check OOZIE_SYS table does not exist
      DONE
      Get Oozie DB version
      DONE
      Upgrade SQL schema
      DONE
      Upgrading to db schema for Oozie 4.0
      Update db.version in OOZIE_SYS table to 2
      DONE
      Post-upgrade COORD_JOBS new columns default values
      DONE
      Post-upgrade COORD_JOBS & COORD_ACTIONS status values
      DONE
      Post-upgrade MISSING_DEPENDENCIES column
      DONE
      Table 'WF_ACTIONS' column 'execution_path', length changed to 1024
      Table 'WF_ACTIONS, column 'error_message', changed to varchar/varchar2
      Table 'COORD_JOB' column 'frequency' changed to varchar/varchar2
      DONE
      Post-upgrade BUNDLE_JOBS, COORD_JOBS, WF_JOBS to drop AUTH_TOKEN column
      DONE
      Get Oozie DB version
      DONE
      Upgrading to db schema for Oozie 4.1.0-SNAPSHOT
      Update db.version in OOZIE_SYS table to 3
      DONE
      Converting text columns to bytea for all tables
      
      Error: ERROR: syntax error at or near "\"
        Position: 61
      
      Stack trace for the error was (for debug purposes):
      --------------------------------------
      org.postgresql.util.PSQLException: ERROR: syntax error at or near "\"
        Position: 61
      	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
      	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
      	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
      	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:302)
      	at org.apache.oozie.tools.OozieDBCLI.convertClobToBlobInPostgres(OozieDBCLI.java:533)
      	at org.apache.oozie.tools.OozieDBCLI.ddlTweaksFor50(OozieDBCLI.java:621)
      	at org.apache.oozie.tools.OozieDBCLI.upgradeDBto50(OozieDBCLI.java:239)
      	at org.apache.oozie.tools.OozieDBCLI.upgradeDB(OozieDBCLI.java:219)
      	at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:128)
      	at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:76)
      --------------------------------------
      
      

        Attachments

        1. OOZIE-1674.patch
          7 kB
          Robert Kanter

          Issue Links

            Activity

              People

              • Assignee:
                rkanter Robert Kanter
                Reporter:
                rkanter Robert Kanter
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: