Setup and Run Oozie Examples

To get familiar with Oozie, set up and try the examples.
  1. Complete the following steps to set up the examples and copy them to the cluster:
    1. Extract the oozie examples archive oozie-examples.tar.gz:
      cd /opt/mapr/oozie/oozie-<version>
      tar xvfz ./oozie-examples.tar.gz -C /opt/mapr/oozie/oozie-<version>/
    2. Copy the examples to MapR file system. Run the following command as a user that has permissions to write to the specified MapR file system directory:
      hadoop fs -put examples maprfs:///user/<user_name>/examples
  2. Complete the following steps to run the examples:
    1. Choose an example and run it with the oozie job command. You can use the following commands to run the following examples. The <oozie_port_number> depends on whether your cluster is secure.
      • MapReduce
        /opt/mapr/oozie/oozie-<version>/bin/oozie job -oozie="http://localhost:<oozie_port_number>/oozie" -config /opt/mapr/oozie/oozie-<version>/examples/apps/map-reduce/ -run
      • Spark
        /opt/mapr/oozie/oozie-<version>/bin/oozie job -oozie="http://localhost:<oozie_port_number>/oozie" -config /opt/mapr/oozie/oozie-<version>/examples/apps/spark/ -run
      Note: To run the packaged Hive examples, make /tmp on MapR file system world-writable. Set /tmp to 777. Example:
      hadoop fs -chmod -R 777 /tmp
      If /tmp does not exist, create /tmp and then set it to 777.