Command Line Upgrade
Also available as:
loading table of contents...

Configure and Start Apache Oozie


The su commands in this section use keywords to represent the Service user. For example, "hdfs" is used to represent the HDFS Service user. If you are using another name for your Service users, you need to substitute your Service user name in each of the su commands.

Upgrading Apache Oozie is a complex process. Although the instructions are straightforward, set aside a dedicated block of time to upgrade oozie clients and servers.

Perform the following preparation steps on each oozie server host:

  1. You must restore oozie-site.xml from your backup to the conf directory on each oozie server and client.

  2. Copy the JDBC jar to libext-customer.

    1. Create the /usr/hdp/<version>/oozie-server/libext-customer directory.

      cd /usr/hdp/<version>/oozie-server

      mkdir libext-customer

    2. Grant read/write/execute access to all users for the libext-customer directory.

      chmod -R 777 /usr/hdp/<version>/oozie-server/libext-customer

  3. Copy these files to the libext-customer directory

    cp /usr/hdp/<version>/hadoop-client/lib/hadoop*lzo*.jar /usr/hdp/current/oozie-server/libext-customer

    cp /usr/share/HDP-oozie/ /usr/hdp/<version>/oozie-server/libext-customer/

    Also, copy Oozie db jar in libext-customer.

  4. Extract share-lib.

    cd /usr/hdp/<version>/oozie

    tar xzvf /usr/hdp/<version>/oozie/oozie-sharelib.tar.gz

    su - hdfs -c "hdfs dfs -mkdir -p /user/oozie"

    su - hdfs -c "hdfs dfs -copyFromLocal /usr/hdp/current/oozie/share /user/oozie/."

    You can expect to see complaints that some files already exist. Delete any existing /oozie/share and replace it with the newly-extracted files.

    su - hdfs -c "hdfs dfs -chown oozie:hadoop /user/oozie" su -l hdfs -c "hdfs dfs -chmod -R 755 /user/oozie"

  5. if a previous version of Oozie was created using auto schema creation, run the following SQL query:

    insert into oozie_sys (name, data) values ('db.version', '2.5');

  6. As the Oozie user (not root), run the upgrade.

    su - oozie -c "/usr/hdp/current/oozie-server/bin/ upgrade -run"

  7. As root, prepare the Oozie WAR file.

    su - oozie -c "/usr/hdp/current/oozie/bin/ prepare-war -d /usr/hdp/current/oozie/libext-customer"

    Look for console output to indicate success. For example, if you are using MySQL you should see something similar to:

    INFO: Adding extension: libext-customer/mysql-connector-java.jar
    New Oozie WAR file with added 'JARs' at /var/lib/oozie/oozie-server/webapps/oozie.war 
  8. Add the following property to

    log4j.appender.oozie.layout.ConversionPattern=%d{ISO8601} %5p %c{1}:%L - SERVER[${}] %m%n

    where ${} is determined by oozie, automatically.

  9. Start Oozie as the Oozie user:

    su - oozie -c "cd /grid/0/var/log/oozie; /usr/hdp/current/oozie/oozie-server/bin/ /usr/hdp/current/oozie/oozie-server/bin/ /usr/hdp/current/oozie-server/bin/ start"

  10. Check processes.

    ps -ef | grep -i oozie