How to build Oozie docs updated

Small refactoring + added information about Hadoop 2.x and JDK 1.7

Change-Id: I4ccbd6574d49c12ace518de43db471de7b99706d
This commit is contained in:
Andrey Pavlov 2015-04-07 17:42:34 +03:00
parent 70b92f0625
commit b582c6c80c

View File

@ -5,40 +5,62 @@ How to build Oozie
Apache does not make Oozie builds, so it has to be built manually.
Prerequisites
-------------
Download
--------
* Maven
* JDK 1.6 (1.7 is not allowed there)
* Downloaded Oozie distribution from `Apache mirror <http://apache-mirror.rbc.ru/pub/apache/oozie/4.0.0>`_
* Downloaded `ext-2.2.zip <http://extjs.com/deploy/ext-2.2.zip>`_ (it is needed for enable Oozie web console)
* All Hadoop jar files (either on hadoop cluster or simply from any repository)
* Download tarball from `Apache mirror <http://apache-mirror.rbc.ru/pub/apache/oozie/4.0.1>`_
* Unpack it with
.. note::
.. sourcecode:: console
Name of extJS archive should be only ``ext-2.2.zip``, there is a check in oozie-setup.sh
$ tar -xzvf oozie-4.0.1.tar.gz
To build oozie.tar.gz you should follow the steps below:
Hadoop Versions
---------------
* Make package:
To build Oozie the following command can be used:
.. sourcecode:: console
$ bin/mkdistro.sh -DskipTests
$ {oozie_dir}/bin/mkdistro.sh -DskipTests
* Unpack file distro/target/oozie-x.x.x-distro.tar.gz
* Create ``libext`` directory in <oozie-path>
* Copy hadoop jars (including hadoop-core, hadoop-client, hadoop-auth) and ``ext-2.2.zip`` to ``libext`` directory
* Prepare war for Oozie web console:
By default it builds against Hadoop 1.1.1. To built it with 2.x Hadoop version:
* hadoop-2 version in pom.xml files should be changed.
It could be done manually or with following command(You should replace
2.x.x to your hadoop version):
.. sourcecode:: console
$ find . -name pom.xml | xargs sed -ri 's/2.3.0/2.x.x/'
* build command should be launched with ``-P hadoop-2`` flag
JDK Versions
------------
By default, the build configuration enforces that JDK 1.6.* is being used.
There are 2 build properties that can be used to change the JDK version requirements:
* ``javaVersion`` specifies the version of the JDK used to compile (default 1.6)
* ``targetJavaVersion`` specifies the version of the generated bytecode (default 1.6)
For example, to specify 1.7 JDK version, build command should contain
``-D javaVersion=1.7 -D tagetJavaVersion=1.7`` flags.
Build
-----
To build Ozzie with 2.6.0 hadoop and 1.7 JDK versions following command can be
used:
.. sourcecode:: console
$ bin/oozie-setup.sh prepare-war
$ {oozie_dir}/bin/mkdistro.sh assembly:single -P hadoop-2 -D javaVersion=1.7 -D targetJavaVersion=1.7 -D skipTests
Then your Oozie package is ready, pack it to tar.gz:
Also, pig version can be passed as maven property with ``-D pig.version=x.x.x``
flag.
.. sourcecode:: console
$ tar -czf oozie.tar.gz <oozie-dir>
Similar instruction to build oozie.tar.gz you may find there: http://oozie.apache.org/docs/4.0.0/DG_QuickStart.html#Building_Oozie
Similar instruction to build oozie.tar.gz you may find there: http://oozie.apache.org/docs/4.0.0/DG_QuickStart.html#Building_Oozie