16. Configure and Start Apache Oozie

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/current/oozie-client/libext-customer directory.

      cd /usr/hdp/current/oozie-client mkdir libext-customer

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

      chmod -R 777 /usr/hdp/current/oozie-client/libext-customer

  3. Copy these files to the libext-customer directory

    cp /usr/hdp/current/hadoop/lib/hadooplzo*.jar /usr/hdp/current/oozie/libext-customer

    cp /usr/share/HDP-oozie/ext-2.2.zip /usr/hdp/current/oozie/libext-customer/

    [Note]Note

    If you do not have an LZO JAR file, you must enable LZO compression first. See Install Compression Libraries.

  4. Extract share-lib.

    /usr/hdp/current/oozie/bin/oozie-setup.sh sharelib create -fs hdfs://<namenode>:8020

    To verify that the sharelibs extracted correctly, run the following command:

    oozie admin -oozie http://<oozie server host address>:11000/oozie -shareliblist

    There should be:

    • Available ShareLib

    • oozie

    • hive

    • distcp

    • hcatalog

    • sqoop

    • mapreduce-streaming

    • pig

    Change the ownershop and permissions of the oozie directory:

    su -l 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, you must run an SQL query.

    Use the oozie-site.xml properties:

    • oozie.service.JPAService.jdbc.username

    • oozie.service.JPAService.jdbc.username

    • oozie.service.JPAService.jdbc.url

    to obtain the password, username and db to run the query.

    Run the 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_USER

    /usr/hdp/current/oozie-server/bin/ooziedb.sh upgrade -run

  7. As root, prepare the Oozie WAR file.

    sudo su -l oozie -c "/usr/hdp/current/oozie/bin/oozie-setup.sh 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. Replace the content of /user/oozie-server/share in HDFS. On the Oozie server host:

    sudo su -l oozie -c "/usr/hdp/current/oozie-server/bin/oozie-setup.sh prepare-war -d /usr/hdp/current/oozie/libext-customer"

  9. Add the following property to oozie-log4j.properties:

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

    where ${oozie.instance.id} is determined by oozie, automatically.

  10. Start Oozie as the Oozie user:

    sudo su -l <OOZIE_User> -c "export OOZIE_CATALINA_HOME='usr/lib/bigtop-tomcat'; $OOZIE_CATALINA_HOME/catalina.sh $OOZIE_CATALINA_HOME/setclasspath.sh
    /usr/hdp/current/oozie-server/bin/oozied.sh start”
  11. Check processes.

    ps -ef | grep -i oozie


loading table of contents...