Setup and Run Oozie Examples

About this task

IMPORTANT This component is deprecated. Hewlett Packard Enterprise recommends using an alternate product. For more information, see Discontinued Ecosystem Components.
To get familiar with Oozie, set up and try the examples.

Procedure

  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 filesystem. Run the following command as a user that has permissions to write to the specified MapR filesystem 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/job.properties -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/job.properties -run
      NOTE To run the packaged Hive examples, make /tmp on MapR filesystem 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.