You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ve...@apache.org on 2013/07/10 22:05:38 UTC

[8/8] git commit: FALCON-1 Create packaging and scripts to install and try Apache Falcon. Contributed by Srikanth Sundarrajan

FALCON-1 Create packaging and scripts to install and try Apache Falcon. Contributed by Srikanth Sundarrajan


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/61417357
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/61417357
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/61417357

Branch: refs/heads/master
Commit: 614173574b0f37a7cb3c068c322ca88326722b47
Parents: d7e2be9
Author: venkatesh <ve...@hortonworks.com>
Authored: Wed Jul 10 13:06:16 2013 -0700
Committer: venkatesh <ve...@hortonworks.com>
Committed: Wed Jul 10 13:06:16 2013 -0700

----------------------------------------------------------------------
 .gitignore                                      |   3 +
 Installation-steps.txt                          |   2 +-
 build-tools/pom.xml                             |  22 +
 build-tools/src/bin/OOZIE-674.sh                |  35 +
 .../src/main/resources/falcon/checkstyle.xml    |   6 +-
 client/bin/falcon                               |  29 -
 client/src/main/resources/falcon.sh             |  50 --
 common/src/main/resources/log4j.xml             |   8 +-
 common/src/main/resources/startup.properties    |   6 +-
 docs/src/site/twiki/FalconDocumentation.twiki   |   2 +-
 hadoop-webapp/pom.xml                           | 110 +++
 .../falcon/listener/HadoopStartupListener.java  |  79 +++
 hadoop-webapp/src/main/resources/core-site.xml  |  44 ++
 hadoop-webapp/src/main/resources/hdfs-site.xml  |  64 ++
 .../src/main/resources/mapred-site.xml          |  68 ++
 hadoop-webapp/src/main/webapp/WEB-INF/web.xml   |  32 +
 messaging/src/main/resources/log4j.xml          |   4 +-
 oozie-3.2.0-incubating-el.patch                 | 702 +++++++++++++++++++
 oozie-bundle-el-extension.patch                 |  18 +
 oozie-el-extensions/pom.xml                     |  56 ++
 .../oozie/extensions/OozieELExtensions.java     | 386 ++++++++++
 .../oozie/extensions/TestOozieELExtensions.java | 278 ++++++++
 .../src/test/resources/oozie-site.xml           | 363 ++++++++++
 oozie/pom.xml                                   |   5 +
 pom.xml                                         |  67 +-
 prism/src/main/resources/log4j.xml              |   8 +-
 .../converter/OozieProcessMapperTest.java       |   6 +
 src/bin/falcon                                  |  50 ++
 src/bin/falcon-start                            |  55 ++
 src/bin/falcon-stop                             |  37 +
 src/bin/package.sh                              |  66 ++
 src/conf/client.properties                      |  23 +
 src/conf/log4j.xml                              |  89 +++
 src/conf/runtime.properties                     |  29 +
 src/conf/startup.properties                     |  63 ++
 src/main/assemblies/package.xml                 | 112 +++
 webapp/pom.xml                                  | 175 ++++-
 .../conf/action-conf/distcp-action-0.1.xsd      |  65 ++
 .../conf/action-conf/distcp-action-0.2.xsd      |  65 ++
 .../oozie/conf/action-conf/email-action-0.1.xsd |  33 +
 .../conf/action-conf/gms-oozie-sla-0.1.xsd      |  78 +++
 .../oozie/conf/action-conf/hive-action-0.2.xsd  |  68 ++
 .../oozie/conf/action-conf/hive-action-0.3.xsd  |  68 ++
 .../oozie/conf/action-conf/hive-action-0.4.xsd  |  68 ++
 .../oozie/conf/action-conf/hive-action-0.5.xsd  |  69 ++
 webapp/src/conf/oozie/conf/action-conf/hive.xml |  35 +
 .../conf/action-conf/oozie-buildinfo.properties |  35 +
 .../oozie/conf/action-conf/oozie-bundle-0.1.xsd |  61 ++
 .../oozie/conf/action-conf/oozie-bundle-0.2.xsd |  75 ++
 .../conf/action-conf/oozie-coordinator-0.1.xsd  | 132 ++++
 .../conf/action-conf/oozie-coordinator-0.2.xsd  | 133 ++++
 .../conf/action-conf/oozie-coordinator-0.3.xsd  | 133 ++++
 .../conf/action-conf/oozie-coordinator-0.4.xsd  | 147 ++++
 .../oozie/conf/action-conf/oozie-sla-0.1.xsd    |  63 ++
 .../oozie/conf/action-conf/oozie-sla-0.2.xsd    |  47 ++
 .../conf/action-conf/oozie-workflow-0.1.xsd     | 301 ++++++++
 .../conf/action-conf/oozie-workflow-0.2.5.xsd   | 288 ++++++++
 .../conf/action-conf/oozie-workflow-0.2.xsd     | 263 +++++++
 .../conf/action-conf/oozie-workflow-0.3.xsd     | 288 ++++++++
 .../conf/action-conf/oozie-workflow-0.4.xsd     | 329 +++++++++
 .../conf/action-conf/oozie-workflow-0.5.xsd     | 339 +++++++++
 .../oozie/conf/action-conf/shell-action-0.1.xsd |  73 ++
 .../oozie/conf/action-conf/shell-action-0.2.xsd |  73 ++
 .../oozie/conf/action-conf/shell-action-0.3.xsd |  73 ++
 .../oozie/conf/action-conf/sqoop-action-0.2.xsd |  70 ++
 .../oozie/conf/action-conf/sqoop-action-0.3.xsd |  70 ++
 .../oozie/conf/action-conf/sqoop-action-0.4.xsd |  70 ++
 .../oozie/conf/action-conf/ssh-action-0.1.xsd   |  36 +
 .../oozie/conf/action-conf/ssh-action-0.2.xsd   |  39 ++
 .../conf/oozie/conf/hadoop-conf/core-site.xml   |  42 ++
 webapp/src/conf/oozie/conf/oozie-site.xml       | 527 ++++++++++++++
 .../src/main/java/org/apache/falcon/Main.java   |  15 +-
 webapp/src/main/resources/log4j.xml             |   8 +-
 .../java/org/apache/falcon/cli/FalconCLIIT.java | 603 ++++++++++++++++
 .../org/apache/falcon/cli/FalconCLITest.java    | 572 ---------------
 .../org/apache/falcon/logging/LogMoverIT.java   | 162 +++++
 .../org/apache/falcon/logging/LogMoverTest.java | 154 ----
 .../apache/falcon/logging/LogProviderIT.java    | 160 +++++
 .../apache/falcon/logging/LogProviderTest.java  | 151 ----
 .../falcon/resource/AbstractTestBase.java       | 410 -----------
 .../falcon/resource/EntityManagerJerseyIT.java  | 626 +++++++++++++++++
 .../resource/EntityManagerJerseyTest.java       | 573 ---------------
 .../resource/ProcessInstanceManagerIT.java      | 154 ++++
 .../resource/ProcessInstanceManagerTest.java    | 148 ----
 .../org/apache/falcon/resource/TestContext.java | 440 ++++++++++++
 webapp/src/test/resources/client.properties     |   2 +-
 webapp/src/test/resources/cluster-template.xml  |  10 +-
 87 files changed, 9468 insertions(+), 2128 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 2525236..c22e2b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,3 +31,6 @@ target
 #ActiveMQ
 activemq-data
 build
+
+#log files
+logs

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/Installation-steps.txt
----------------------------------------------------------------------
diff --git a/Installation-steps.txt b/Installation-steps.txt
index a00cfc9..4631dff 100644
--- a/Installation-steps.txt
+++ b/Installation-steps.txt
@@ -69,6 +69,6 @@ qa.config.store.uri=file:///var/lib/tomcat6/target/store
 To ensure that Falcon installation on your system uses the qa domain settings, just set the FALCON_DOMAIN value to 'qa' in your environment.
 
 *Falcon logs
-Once deployed, all the Falcon operations are logged in folder /var/log/falcon by default.
+Once deployed, all the Falcon operations are logged in folder ${user.dir}/logs by default.
 Application.log contains logs for all the falcon server operations, if Falcon is deployed in distributed mode then prism logs are populated in
 Prism.log

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/build-tools/pom.xml b/build-tools/pom.xml
index c7e7c73..a04c807 100644
--- a/build-tools/pom.xml
+++ b/build-tools/pom.xml
@@ -25,4 +25,26 @@
     <artifactId>build-tools</artifactId>
     <version>0.3-SNAPSHOT</version>
     <name>Build Tools</name>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>exec-maven-plugin</artifactId>
+                <version>1.1</version>
+                <executions>
+                    <execution>
+                        <id>BUILD-OOZIE</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>exec</goal>
+                        </goals>
+                        <configuration>
+                            <executable>src/bin/OOZIE-674.sh</executable>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/build-tools/src/bin/OOZIE-674.sh
----------------------------------------------------------------------
diff --git a/build-tools/src/bin/OOZIE-674.sh b/build-tools/src/bin/OOZIE-674.sh
new file mode 100644
index 0000000..6debd86
--- /dev/null
+++ b/build-tools/src/bin/OOZIE-674.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ -d `mvn help:effective-settings | grep localRepository | cut -d\> -f2 | cut -d\< -f1`/org/apache/oozie/oozie-core/3.2.2 ]
+then
+    echo "Oozie already setup. skipping";
+    exit 0;
+fi
+
+mkdir -p ../target
+pushd ../target
+rm -rf oozie-3.2.0-incubating*
+curl -v "http://www.gtlib.gatech.edu/pub/apache/oozie/3.2.0-incubating/oozie-3.2.0-incubating.tar.gz" -o oozie-3.2.0-incubating.tgz
+tar -xzvf oozie-3.2.0-incubating.tgz
+cd oozie-3.2.0-incubating
+pwd
+patch -p0 < ../../oozie-3.2.0-incubating-el.patch
+mvn clean install -DskipTests
+rm -rf oozie-3.2.0-incubating*
+popd

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/build-tools/src/main/resources/falcon/checkstyle.xml
----------------------------------------------------------------------
diff --git a/build-tools/src/main/resources/falcon/checkstyle.xml b/build-tools/src/main/resources/falcon/checkstyle.xml
index 0d60e27..6525990 100644
--- a/build-tools/src/main/resources/falcon/checkstyle.xml
+++ b/build-tools/src/main/resources/falcon/checkstyle.xml
@@ -225,9 +225,9 @@
 
     <!-- allow warnings to be suppressed -->
     <module name="SuppressionCommentFilter">
-        <property name="offCommentFormat" value="SUSPEND CHECKSTYLE CHECK ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck"/>
-        <property name="onCommentFormat" value="RESUME CHECKSTYLE CHECK ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck"/>
-        <property name="checkFormat" value="ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck"/>
+        <property name="offCommentFormat" value="SUSPEND CHECKSTYLE CHECK ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck|MethodName"/>
+        <property name="onCommentFormat" value="RESUME CHECKSTYLE CHECK ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck|MethodName"/>
+        <property name="checkFormat" value="ParameterNumberCheck|VisibilityModifierCheck|HiddenFieldCheck|MethodName"/>
     </module>
 
 </module>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/client/bin/falcon
----------------------------------------------------------------------
diff --git a/client/bin/falcon b/client/bin/falcon
deleted file mode 100644
index b0fb0eb..0000000
--- a/client/bin/falcon
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-PRG="${0}"
-BASEDIR=`dirname ${PRG}`
-BASEDIR=`cd ${BASEDIR}/..;pwd`
-
-
-CLASSPATH=${CLASSPATH}:`ls target/falcon-client-*.jar`
-for f in $BASEDIR/target/dependency/*.jar; do
-  CLASSPATH=${CLASSPATH}:$f;
-done
-
-exec java -cp $CLASSPATH org.apache.falcon.cli.FalconCLI $@

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/client/src/main/resources/falcon.sh
----------------------------------------------------------------------
diff --git a/client/src/main/resources/falcon.sh b/client/src/main/resources/falcon.sh
deleted file mode 100644
index f45e458..0000000
--- a/client/src/main/resources/falcon.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-#  limitations under the License. See accompanying LICENSE file.
-#
-
-# resolve links - $0 may be a softlink
-PRG="${0}"
-
-while [ -h "${PRG}" ]; do
-  ls=`ls -ld "${PRG}"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "${PRG}"`/"$link"
-  fi
-done
-
-BASEDIR=`dirname ${PRG}`
-BASEDIR=`cd ${BASEDIR}/..;pwd`
-
-FALCONCPPATH=""
-for i in "${BASEDIR}/lib/"*.jar; do
-  FALCONCPPATH="${FALCONCPPATH}:$i"
-done
-
-
-if test -z ${JAVA_HOME}
-then
-    JAVA_BIN=java
-else
-    JAVA_BIN=${JAVA_HOME}/bin/java
-fi
-
-JAVA_PROPERTIES=""
-while [[ ${1} =~ ^\-D ]]; do
-  JAVA_PROPERTIES="${JAVA_PROPERTIES} ${1}"
-  shift
-done
-${JAVA_BIN} ${JAVA_PROPERTIES} -cp ${FALCONCPPATH} org.apache.falcon.cli.FalconCLI "${@}"

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/common/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/common/src/main/resources/log4j.xml b/common/src/main/resources/log4j.xml
index 189d096..4183181 100644
--- a/common/src/main/resources/log4j.xml
+++ b/common/src/main/resources/log4j.xml
@@ -28,7 +28,7 @@
     </appender>
 
     <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
-        <param name="File" value="/var/log/falcon/application.log"/>
+        <param name="File" value="${user.dir}/logs/application.log"/>
         <param name="Append" value="true"/>
         <param name="Threshold" value="debug"/>
         <layout class="org.apache.log4j.PatternLayout">
@@ -37,7 +37,7 @@
     </appender>
 
     <appender name="AUDIT" class="org.apache.log4j.DailyRollingFileAppender">
-        <param name="File" value="/var/log/falcon/audit.log"/>
+        <param name="File" value="${user.dir}/logs/audit.log"/>
         <param name="Append" value="true"/>
         <param name="Threshold" value="debug"/>
         <layout class="org.apache.log4j.PatternLayout">
@@ -46,7 +46,7 @@
     </appender>
 
     <appender name="TRANSACTIONLOG" class="org.apache.log4j.DailyRollingFileAppender">
-        <param name="File" value="/var/log/falcon/tranlog.log"/>
+        <param name="File" value="${user.dir}/logs/tranlog.log"/>
         <param name="Append" value="true"/>
         <param name="Threshold" value="debug"/>
         <layout class="org.apache.log4j.PatternLayout">
@@ -55,7 +55,7 @@
     </appender>
 
     <appender name="METRIC" class="org.apache.log4j.DailyRollingFileAppender">
-        <param name="File" value="/var/log/falcon/metric.log"/>
+        <param name="File" value="${user.dir}/logs/metric.log"/>
         <param name="Append" value="true"/>
         <param name="Threshold" value="debug"/>
         <layout class="org.apache.log4j.PatternLayout">

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/common/src/main/resources/startup.properties
----------------------------------------------------------------------
diff --git a/common/src/main/resources/startup.properties b/common/src/main/resources/startup.properties
index 4accc39..4ff00d7 100644
--- a/common/src/main/resources/startup.properties
+++ b/common/src/main/resources/startup.properties
@@ -44,7 +44,7 @@
 
 *.system.lib.location=${FALCON_HOME}/sharedlibs
 
-debug.config.store.uri=${user.dir}/target/store
+debug.config.store.uri=file://${user.dir}/target/store
 debug.config.oozie.conf.uri=${user.dir}/target/oozie
 debug.system.lib.location=${user.dir}/webapp/target/falcon-webapp-${pom.version}/WEB-INF/lib
 debug.broker.url=vm://localhost
@@ -57,9 +57,7 @@ debug.retry.recorder.path=${user.dir}/target/retry
 *.broker.ttlInMins=4320
 *.entity.topic=FALCON.ENTITY.TOPIC
 *.max.retry.failure.count=1
-*.retry.recorder.path=/var/log/falcon/retry
+*.retry.recorder.path=${user.dir}/logs/retry
 
 ######### Properties for configuring iMon client and metric #########
 *.internal.queue.size=1000
-*.imon.inet.address=224.0.0.69
-*.imon.inet.port=9191

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/docs/src/site/twiki/FalconDocumentation.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/FalconDocumentation.twiki b/docs/src/site/twiki/FalconDocumentation.twiki
index fd9e60d..6312627 100644
--- a/docs/src/site/twiki/FalconDocumentation.twiki
+++ b/docs/src/site/twiki/FalconDocumentation.twiki
@@ -460,7 +460,7 @@ Idempotency also by takes care of the condition when request is sent through pri
 Falcon provides monitoring of various events by capturing metrics of those events.
 The metric numbers can then be used to monitor performance and health of the Falcon system and the entire processing pipelines.
 
-Users can view the logs of these events in the metric.log file, by default this file is created under /var/log/falcon/ directory.
+Users can view the logs of these events in the metric.log file, by default this file is created under ${user.dir}/logs/ directory.
 Users may also extend the Falcon monitoring framework to send events to systems like Mondemand/lwes.
 
 The following events are captured by Falcon for logging the metrics:

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/hadoop-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/hadoop-webapp/pom.xml b/hadoop-webapp/pom.xml
new file mode 100644
index 0000000..ba5ee02
--- /dev/null
+++ b/hadoop-webapp/pom.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+    
+       http://www.apache.org/licenses/LICENSE-2.0
+        
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.falcon</groupId>
+        <artifactId>falcon-main</artifactId>
+        <version>0.3-SNAPSHOT</version>
+    </parent>
+    <artifactId>falcon-hadoop-webapp</artifactId>
+    <description>Apache Falcon Embedded Hadoop - Test Cluster</description>
+    <name>Apache Falcon Embedded Hadoop - Test Cluster</name>
+    <packaging>war</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.falcon</groupId>
+            <artifactId>falcon-oozie-el-extension</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.8</version>
+                <executions>
+                    <execution>
+                        <id>explode-war</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>unpack</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.oozie</groupId>
+                                    <artifactId>oozie-webapp</artifactId>
+                                    <type>war</type>
+                                    <outputDirectory>${project.build.directory}/oozie</outputDirectory>
+                                    <destFileName>oozie.war</destFileName>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.8</version>
+                <executions>
+                    <execution>
+                        <id>add-jars</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <outputDirectory>${project.build.directory}/oozie/WEB-INF/lib</outputDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.6</version>
+                <executions>
+                    <execution>
+                        <configuration>
+                            <target>
+                                <war destfile="target/oozie.war" webxml="target/oozie/WEB-INF/web.xml">
+                                    <lib dir="target/oozie/WEB-INF/lib" />
+                                </war>
+                            </target>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <phase>package</phase>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
----------------------------------------------------------------------
diff --git a/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java b/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
new file mode 100644
index 0000000..28013f8
--- /dev/null
+++ b/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
@@ -0,0 +1,79 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.falcon.listener;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hdfs.server.datanode.DataNode;
+import org.apache.hadoop.hdfs.server.namenode.NameNode;
+import org.apache.hadoop.mapred.JobConf;
+import org.apache.hadoop.mapred.JobTracker;
+import org.apache.hadoop.mapred.TaskTracker;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.io.File;
+
+/**
+ * Listener for bootstrapping embedded hadoop cluster for integration tests.
+ */
+public class HadoopStartupListener implements ServletContextListener {
+
+    @Override
+    public void contextInitialized(ServletContextEvent sce) {
+        try {
+            FileUtils.deleteDirectory(new File(System.getProperty("hadoop.tmp.dir")));
+            final Configuration conf = new Configuration();
+
+            NameNode.format(conf);
+            final String[] emptyArgs = {};
+            NameNode.createNameNode(emptyArgs, conf);
+            DataNode.createDataNode(emptyArgs, conf);
+            final JobTracker jobTracker = JobTracker.startTracker(new JobConf(conf));
+            new Thread(new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        jobTracker.offerService();
+                    } catch (Exception e) {
+                        throw new RuntimeException(e);
+                    }
+                }
+            }).start();
+            new Thread(new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        TaskTracker taskTracker = new TaskTracker(new JobConf(conf));
+                        taskTracker.run();
+                    } catch (Exception e) {
+                        throw new RuntimeException(e);
+                    }
+                }
+            }).start();
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RuntimeException("Unable to start hadoop cluster", e);
+        }
+    }
+
+    @Override
+    public void contextDestroyed(ServletContextEvent sce) {
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/hadoop-webapp/src/main/resources/core-site.xml
----------------------------------------------------------------------
diff --git a/hadoop-webapp/src/main/resources/core-site.xml b/hadoop-webapp/src/main/resources/core-site.xml
new file mode 100644
index 0000000..02c8d42
--- /dev/null
+++ b/hadoop-webapp/src/main/resources/core-site.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<configuration>
+    <property>
+        <name>fs.default.name</name>
+        <value>hdfs://localhost:41020</value>
+    </property>
+
+    <property>
+        <name>hadoop.proxyuser.${user.name}.groups</name>
+        <value>*</value>
+        <description>Allow the superuser oozie to impersonate any members of the group group1 and group2</description>
+    </property>
+
+    <property>
+        <name>hadoop.proxyuser.${user.name}.hosts</name>
+        <value>*</value>
+        <description>The superuser can connect only from host1 and host2 to impersonate a user</description>
+    </property>
+
+    <property>
+      <name>hadoop.tmp.dir</name>
+      <value>${project.build.directory}/tmp-hadoop-${user.name}</value>
+      <description>A base for other temporary directories.</description>
+    </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/hadoop-webapp/src/main/resources/hdfs-site.xml
----------------------------------------------------------------------
diff --git a/hadoop-webapp/src/main/resources/hdfs-site.xml b/hadoop-webapp/src/main/resources/hdfs-site.xml
new file mode 100644
index 0000000..0b929e6
--- /dev/null
+++ b/hadoop-webapp/src/main/resources/hdfs-site.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- Put site-specific property overrides in this file. -->
+
+<configuration>
+    <property>
+        <name>dfs.replication</name>
+        <value>1</value>
+    </property>
+
+    <property>
+      <name>dfs.datanode.address</name>
+      <value>0.0.0.0:41110</value>
+      <description>
+        The datanode server address and port for data transfer.
+        If the port is 0 then the server will start on a free port.
+      </description>
+    </property>
+
+    <property>
+      <name>dfs.datanode.http.address</name>
+      <value>0.0.0.0:41175</value>
+      <description>
+        The datanode http server address and port.
+        If the port is 0 then the server will start on a free port.
+      </description>
+    </property>
+
+    <property>
+      <name>dfs.datanode.ipc.address</name>
+      <value>0.0.0.0:41120</value>
+      <description>
+        The datanode ipc server address and port.
+        If the port is 0 then the server will start on a free port.
+      </description>
+    </property>
+
+    <property>
+      <name>dfs.http.address</name>
+      <value>0.0.0.0:41170</value>
+      <description>
+        The address and the base port where the dfs namenode web ui will listen on.
+        If the port is 0 then the server will start on a free port.
+      </description>
+    </property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/hadoop-webapp/src/main/resources/mapred-site.xml
----------------------------------------------------------------------
diff --git a/hadoop-webapp/src/main/resources/mapred-site.xml b/hadoop-webapp/src/main/resources/mapred-site.xml
new file mode 100644
index 0000000..5328d6b
--- /dev/null
+++ b/hadoop-webapp/src/main/resources/mapred-site.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!-- Put site-specific property overrides in this file. -->
+
+<configuration>
+    <property>
+        <name>mapred.job.tracker</name>
+        <value>localhost:41021</value>
+    </property>
+
+    <property>
+        <name>mapred.tasktracker.map.tasks.maximum</name>
+        <value>2</value>
+        <description>The maximum number of map tasks that will be run
+            simultaneously by a task tracker.
+        </description>
+    </property>
+
+    <property>
+        <name>mapred.tasktracker.reduce.tasks.maximum</name>
+        <value>1</value>
+        <description>The maximum number of reduce tasks that will be run
+            simultaneously by a task tracker.
+        </description>
+    </property>
+
+    <property>
+        <name>mapreduce.jobtracker.staging.root.dir</name>
+        <value>/user</value>
+    </property>
+
+    <property>
+      <name>mapred.job.tracker.http.address</name>
+      <value>0.0.0.0:41130</value>
+      <description>
+        The job tracker http server address and port the server will listen on.
+        If the port is 0 then the server will start on a free port.
+      </description>
+    </property>
+
+    <property>
+      <name>mapred.task.tracker.http.address</name>
+      <value>0.0.0.0:41160</value>
+      <description>
+        The task tracker http server address and port.
+        If the port is 0 then the server will start on a free port.
+      </description>
+    </property>
+
+</configuration>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/hadoop-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/hadoop-webapp/src/main/webapp/WEB-INF/web.xml b/hadoop-webapp/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..8b186ad
--- /dev/null
+++ b/hadoop-webapp/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+  -->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+
+    <display-name>Apache Falcon Embedded Hadoop - Test Cluster</display-name>
+    <description>Apache Falcon Embedded Hadoop - Test Cluster</description>
+
+    <listener>
+        <listener-class>org.apache.falcon.listener.HadoopStartupListener</listener-class>
+    </listener>
+
+</web-app>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/messaging/src/main/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/messaging/src/main/resources/log4j.xml b/messaging/src/main/resources/log4j.xml
index 2788c63..50f3cdf 100644
--- a/messaging/src/main/resources/log4j.xml
+++ b/messaging/src/main/resources/log4j.xml
@@ -28,7 +28,7 @@
     </appender>
 
     <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
-        <param name="File" value="/var/log/falcon/application.log"/>
+        <param name="File" value="${user.dir}/logs/application.log"/>
         <param name="Append" value="true"/>
         <param name="Threshold" value="debug"/>
         <layout class="org.apache.log4j.PatternLayout">
@@ -37,7 +37,7 @@
     </appender>
 
     <appender name="AUDIT" class="org.apache.log4j.DailyRollingFileAppender">
-        <param name="File" value="/var/log/falcon/audit.log"/>
+        <param name="File" value="${user.dir}/logs/audit.log"/>
         <param name="Append" value="true"/>
         <param name="Threshold" value="debug"/>
         <layout class="org.apache.log4j.PatternLayout">

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/oozie-3.2.0-incubating-el.patch
----------------------------------------------------------------------
diff --git a/oozie-3.2.0-incubating-el.patch b/oozie-3.2.0-incubating-el.patch
new file mode 100644
index 0000000..87a27bc
--- /dev/null
+++ b/oozie-3.2.0-incubating-el.patch
@@ -0,0 +1,702 @@
+diff --git client/pom.xml client/pom.xml
+index 72da9bc..4e41e28 100644
+--- client/pom.xml
++++ client/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-client</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Client</description>
+     <name>Apache Oozie Client</name>
+     <packaging>jar</packaging>
+diff --git core/pom.xml core/pom.xml
+index 407478d..efbfb47 100644
+--- core/pom.xml
++++ core/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-core</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Core</description>
+     <name>Apache Oozie Core</name>
+     <packaging>jar</packaging>
+diff --git core/src/main/conf/oozie-site.xml core/src/main/conf/oozie-site.xml
+index 63fd7cc..4ee430e 100644
+--- core/src/main/conf/oozie-site.xml
++++ core/src/main/conf/oozie-site.xml
+@@ -121,7 +121,7 @@
+ 
+     <property>
+         <name>oozie.service.JPAService.create.db.schema</name>
+-        <value>false</value>
++        <value>true</value>
+         <description>
+             Creates Oozie DB.
+ 
+@@ -330,6 +330,141 @@
+         </description>
+     </property>
+ 
++     <property>
++        <name>oozie.service.ELService.ext.functions.coord-job-submit-instances</name>
++        <value>
++           now=org.apache.oozie.extensions.OozieELExtensions#ph1_now_echo,
++           today=org.apache.oozie.extensions.OozieELExtensions#ph1_today_echo,
++           yesterday=org.apache.oozie.extensions.OozieELExtensions#ph1_yesterday_echo,
++           currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_currentMonth_echo,
++           lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_lastMonth_echo,
++           currentYear=org.apache.oozie.extensions.OozieELExtensions#ph1_currentYear_echo,
++           lastYear=org.apache.oozie.extensions.OozieELExtensions#ph1_lastYear_echo,
++           formatTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_formatTime_echo,
++           latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo,
++           future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo
++        </value>
++        <description>
++            EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
++            This property is a convenience property to add extensions to the built in executors without having to
++            include all the built in ones.
++        </description>
++    </property>
++
++    <property>
++        <name>oozie.service.ELService.ext.functions.coord-action-create-inst</name>
++        <value>
++           now=org.apache.oozie.extensions.OozieELExtensions#ph2_now_inst,
++           today=org.apache.oozie.extensions.OozieELExtensions#ph2_today_inst,
++           yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday_inst,
++           currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth_inst,
++           lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth_inst,
++           currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear_inst,
++           lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear_inst,
++           latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo,
++           future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo,
++           formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime,
++           user=org.apache.oozie.coord.CoordELFunctions#coord_user
++        </value>
++        <description>
++            EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
++            This property is a convenience property to add extensions to the built in executors without having to
++            include all the built in ones.
++        </description>
++    </property>
++
++    <property>
++        <name>oozie.service.ELService.ext.functions.coord-action-create</name>
++        <value>
++           now=org.apache.oozie.extensions.OozieELExtensions#ph2_now,
++           today=org.apache.oozie.extensions.OozieELExtensions#ph2_today,
++           yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday,
++           currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
++           lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
++           currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
++           lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear,
++           latest=org.apache.oozie.coord.CoordELFunctions#ph2_coord_latest_echo,
++           future=org.apache.oozie.coord.CoordELFunctions#ph2_coord_future_echo,
++           formatTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_formatTime,
++           user=org.apache.oozie.coord.CoordELFunctions#coord_user
++        </value>
++        <description>
++            EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
++            This property is a convenience property to add extensions to the built in executors without having to
++            include all the built in ones.
++        </description>
++    </property>
++
++    <property>
++        <name>oozie.service.ELService.ext.functions.coord-job-submit-data</name>
++        <value>
++           now=org.apache.oozie.extensions.OozieELExtensions#ph1_now_echo,
++           today=org.apache.oozie.extensions.OozieELExtensions#ph1_today_echo,
++           yesterday=org.apache.oozie.extensions.OozieELExtensions#ph1_yesterday_echo,
++           currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_currentMonth_echo,
++           lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph1_lastMonth_echo,
++           currentYear=org.apache.oozie.extensions.OozieELExtensions#ph1_currentYear_echo,
++           lastYear=org.apache.oozie.extensions.OozieELExtensions#ph1_lastYear_echo,
++            dataIn=org.apache.oozie.extensions.OozieELExtensions#ph1_dataIn_echo,
++            instanceTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_nominalTime_echo_wrap,
++            formatTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_formatTime_echo,
++            dateOffset=org.apache.oozie.coord.CoordELFunctions#ph1_coord_dateOffset_echo,
++            user=org.apache.oozie.coord.CoordELFunctions#coord_user
++        </value>
++        <description>
++            EL constant declarations, separated by commas, format is [PREFIX:]NAME=CLASS#CONSTANT.
++            This property is a convenience property to add extensions to the built in executors without having to
++            include all the built in ones.
++        </description>
++    </property>
++
++    <property>
++        <name>oozie.service.ELService.ext.functions.coord-action-start</name>
++        <value>
++           now=org.apache.oozie.extensions.OozieELExtensions#ph2_now,
++           today=org.apache.oozie.extensions.OozieELExtensions#ph2_today,
++           yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday,
++           currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
++           lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
++           currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
++           lastYear=org.apache.oozie.extensions.OozieELExtensions#ph2_lastYear,
++            latest=org.apache.oozie.coord.CoordELFunctions#ph3_coord_latest,
++            future=org.apache.oozie.coord.CoordELFunctions#ph3_coord_future,
++            dataIn=org.apache.oozie.extensions.OozieELExtensions#ph3_dataIn,
++            instanceTime=org.apache.oozie.coord.CoordELFunctions#ph3_coord_nominalTime,
++            dateOffset=org.apache.oozie.coord.CoordELFunctions#ph3_coord_dateOffset,
++            formatTime=org.apache.oozie.coord.CoordELFunctions#ph3_coord_formatTime,
++            user=org.apache.oozie.coord.CoordELFunctions#coord_user
++        </value>
++        <description>
++            EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
++            This property is a convenience property to add extensions to the built in executors without having to
++            include all the built in ones.
++        </description>
++    </property>
++
++    <property>
++        <name>oozie.service.ELService.ext.functions.coord-sla-submit</name>
++        <value>
++            instanceTime=org.apache.oozie.coord.CoordELFunctions#ph1_coord_nominalTime_echo_fixed,
++            user=org.apache.oozie.coord.CoordELFunctions#coord_user
++        </value>
++        <description>
++            EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
++        </description>
++    </property>
++
++        <property>
++        <name>oozie.service.ELService.ext.functions.coord-sla-create</name>
++        <value>
++            instanceTime=org.apache.oozie.coord.CoordELFunctions#ph2_coord_nominalTime,
++            user=org.apache.oozie.coord.CoordELFunctions#coord_user
++        </value>
++        <description>
++            EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
++        </description>
++    </property>
++
+     <!-- Proxyuser Configuration -->
+ 
+     <!--
+diff --git distro/pom.xml distro/pom.xml
+index a09fd66..c842fa7 100644
+--- distro/pom.xml
++++ distro/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-distro</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Distro</description>
+     <name>Apache Oozie Distro</name>
+     <packaging>jar</packaging>
+diff --git docs/pom.xml docs/pom.xml
+index 9d3ad8a..42060e7 100644
+--- docs/pom.xml
++++ docs/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-docs</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Docs</description>
+     <name>Apache Oozie Docs</name>
+     <packaging>war</packaging>
+diff --git examples/pom.xml examples/pom.xml
+index 7906c8c..4591630 100644
+--- examples/pom.xml
++++ examples/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-examples</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Examples</description>
+     <name>Apache Oozie Examples</name>
+     <packaging>jar</packaging>
+diff --git hadooplibs/hadoop-0_23_1/pom.xml hadooplibs/hadoop-0_23_1/pom.xml
+index fbfaa98..6f4a4ff 100644
+--- hadooplibs/hadoop-0_23_1/pom.xml
++++ hadooplibs/hadoop-0_23_1/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/hadoop-0_23_2/pom.xml hadooplibs/hadoop-0_23_2/pom.xml
+index fb59c4e..87713c2 100644
+--- hadooplibs/hadoop-0_23_2/pom.xml
++++ hadooplibs/hadoop-0_23_2/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/hadoop-0_24_0/pom.xml hadooplibs/hadoop-0_24_0/pom.xml
+index 400ff2b..58fa024 100644
+--- hadooplibs/hadoop-0_24_0/pom.xml
++++ hadooplibs/hadoop-0_24_0/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/hadoop-1_0_1/pom.xml hadooplibs/hadoop-1_0_1/pom.xml
+index 7ab1307..16bd748 100644
+--- hadooplibs/hadoop-1_0_1/pom.xml
++++ hadooplibs/hadoop-1_0_1/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/hadoop-test-0_23_1/pom.xml hadooplibs/hadoop-test-0_23_1/pom.xml
+index 1125e2d..dc43c93 100644
+--- hadooplibs/hadoop-test-0_23_1/pom.xml
++++ hadooplibs/hadoop-test-0_23_1/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/hadoop-test-0_23_2/pom.xml hadooplibs/hadoop-test-0_23_2/pom.xml
+index ca27978..b57d288 100644
+--- hadooplibs/hadoop-test-0_23_2/pom.xml
++++ hadooplibs/hadoop-test-0_23_2/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/hadoop-test-0_24_0/pom.xml hadooplibs/hadoop-test-0_24_0/pom.xml
+index ca45192..aaedde4 100644
+--- hadooplibs/hadoop-test-0_24_0/pom.xml
++++ hadooplibs/hadoop-test-0_24_0/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/hadoop-test-1_0_1/pom.xml hadooplibs/hadoop-test-1_0_1/pom.xml
+index 42681eb..7f63435 100644
+--- hadooplibs/hadoop-test-1_0_1/pom.xml
++++ hadooplibs/hadoop-test-1_0_1/pom.xml
+@@ -22,7 +22,7 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../../pom.xml</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+diff --git hadooplibs/pom.xml hadooplibs/pom.xml
+index b589ec6..f51aa32 100644
+--- hadooplibs/pom.xml
++++ hadooplibs/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-hadooplibs</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Hadoop Libs</description>
+     <name>Apache Oozie Hadoop Libs</name>
+     <packaging>pom</packaging>
+diff --git minitest/pom.xml minitest/pom.xml
+index 2e30f28..3baa1b1 100644
+--- minitest/pom.xml
++++ minitest/pom.xml
+@@ -21,7 +21,7 @@
+ 	<modelVersion>4.0.0</modelVersion>
+ 	<groupId>org.apache.oozie.test</groupId>
+ 	<artifactId>oozie-mini</artifactId>
+-	<version>3.2.0-incubating</version>
++	<version>3.2.2</version>
+ 	<repositories>
+ 		<repository>
+ 			<id>central</id>
+@@ -66,13 +66,13 @@
+ 		<dependency>
+ 			<groupId>org.apache.oozie</groupId>
+ 			<artifactId>oozie-core</artifactId>
+-			<version>3.2.0-incubating</version>
++			<version>3.2.2</version>
+ 			<scope>test</scope>
+ 		</dependency>
+ 		<dependency>
+ 			<groupId>org.apache.oozie</groupId>
+ 			<artifactId>oozie-core</artifactId>
+-			<version>3.2.0-incubating</version>
++			<version>3.2.2</version>
+ 			<type>test-jar</type>
+ 			<scope>test</scope>
+ 		</dependency>
+diff --git pom.xml pom.xml
+index a9ce403..6b044dc 100644
+--- pom.xml
++++ pom.xml
+@@ -21,7 +21,7 @@
+     <modelVersion>4.0.0</modelVersion>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-main</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Main</description>
+     <name>Apache Oozie Main</name>
+     <packaging>pom</packaging>
+diff --git release-log.txt release-log.txt
+index 40aee58..7b37eff 100644
+--- release-log.txt
++++ release-log.txt
+@@ -3,7 +3,7 @@
+ OOZIE-852 remove pipes binaries from the source (tucu)
+ OOZIE-851 demo workflow example does not enable sharelib for pig and streaming (tucu)
+ OOZIE-850 apache-rat report should be a single global report file (tucu)
+-OOZIE-849 set version in branch-3.2 to 3.2.0-incubating (tucu)
++OOZIE-849 set version in branch-3.2 to 3.2.2 (tucu)
+ OOZIE-852 remove pipes binaries from the source (tucu)
+ OOZIE-851 demo workflow example does not enable sharelib for pig and streaming (tucu)
+ OOZIE-850 apache-rat report should be a single global report file (tucu)
+diff --git sharelib/hive/pom.xml sharelib/hive/pom.xml
+index ba22a8f..5ef0cfa 100644
+--- sharelib/hive/pom.xml
++++ sharelib/hive/pom.xml
+@@ -22,12 +22,12 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../..</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-sharelib-hive</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Share Lib Hive</description>
+     <name>Apache Oozie Share Lib Hive</name>
+     <packaging>jar</packaging>
+diff --git sharelib/oozie/pom.xml sharelib/oozie/pom.xml
+index 0d764e8..ee4f21e 100644
+--- sharelib/oozie/pom.xml
++++ sharelib/oozie/pom.xml
+@@ -22,12 +22,12 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../..</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-sharelib-oozie</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Share Lib Oozie</description>
+     <name>Apache Oozie Share Lib Oozie</name>
+     <packaging>jar</packaging>
+diff --git sharelib/pig/pom.xml sharelib/pig/pom.xml
+index 2dd0b57..58f9ac9 100644
+--- sharelib/pig/pom.xml
++++ sharelib/pig/pom.xml
+@@ -22,12 +22,12 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../..</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-sharelib-pig</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Share Lib Pig</description>
+     <name>Apache Oozie Share Lib Pig</name>
+     <packaging>jar</packaging>
+diff --git sharelib/pom.xml sharelib/pom.xml
+index 1bf4743..6ded846 100644
+--- sharelib/pom.xml
++++ sharelib/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-sharelib</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Share Lib</description>
+     <name>Apache Oozie Share Lib</name>
+     <packaging>pom</packaging>
+diff --git sharelib/sqoop/pom.xml sharelib/sqoop/pom.xml
+index 46c936c..0f1a086 100644
+--- sharelib/sqoop/pom.xml
++++ sharelib/sqoop/pom.xml
+@@ -22,12 +22,12 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../..</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-sharelib-sqoop</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Share Lib Sqoop</description>
+     <name>Apache Oozie Share Lib Sqoop</name>
+     <packaging>jar</packaging>
+diff --git sharelib/streaming/pom.xml sharelib/streaming/pom.xml
+index 6524fcd..ca8551a 100644
+--- sharelib/streaming/pom.xml
++++ sharelib/streaming/pom.xml
+@@ -22,12 +22,12 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+         <relativePath>../..</relativePath>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-sharelib-streaming</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Share Lib Streaming</description>
+     <name>Apache Oozie Share Lib Streaming</name>
+     <packaging>jar</packaging>
+diff --git tools/pom.xml tools/pom.xml
+index 02f7f66..e3b0e49 100644
+--- tools/pom.xml
++++ tools/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-tools</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie Tools</description>
+     <name>Apache Oozie Tools</name>
+     <packaging>jar</packaging>
+diff --git webapp/pom.xml webapp/pom.xml
+index 38ec438..f354e4b 100644
+--- webapp/pom.xml
++++ webapp/pom.xml
+@@ -22,11 +22,11 @@
+     <parent>
+         <groupId>org.apache.oozie</groupId>
+         <artifactId>oozie-main</artifactId>
+-        <version>3.2.0-incubating</version>
++        <version>3.2.2</version>
+     </parent>
+     <groupId>org.apache.oozie</groupId>
+     <artifactId>oozie-webapp</artifactId>
+-    <version>3.2.0-incubating</version>
++    <version>3.2.2</version>
+     <description>Apache Oozie WebApp</description>
+     <name>Apache Oozie WebApp</name>
+     <packaging>war</packaging>
+diff --git core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
+index 33150a6..6b1b33c 100644
+--- core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
++++ core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
+@@ -51,28 +51,36 @@ public class CoordCommandUtils {
+      * parse a function like coord:latest(n)/future() and return the 'n'.
+      * <p/>
+      * @param function
+-     * @param event
+-     * @param appInst
+-     * @param conf
+      * @param restArg
+      * @return int instanceNumber
+      * @throws Exception
+      */
+-    public static int getInstanceNumber(String function, Element event, SyncCoordAction appInst, Configuration conf,
+-            StringBuilder restArg) throws Exception {
+-        ELEvaluator eval = CoordELEvaluator
+-                .createInstancesELEvaluator("coord-action-create-inst", event, appInst, conf);
+-        String newFunc = CoordELFunctions.evalAndWrap(eval, function);
+-        int funcType = getFuncType(newFunc);
++    public static int getInstanceNumber(String function, StringBuilder restArg) throws Exception {
++        int funcType = getFuncType(function);
+         if (funcType == CURRENT || funcType == LATEST) {
+-            return parseOneArg(newFunc);
++            return parseOneArg(function);
+         }
+         else {
+-            return parseMoreArgs(newFunc, restArg);
++            return parseMoreArgs(function, restArg);
+         }
+     }
+ 
+-    private static int parseOneArg(String funcName) throws Exception {
++    /**
++     * Evaluates function for coord-action-create-inst tag
++     * @param event
++     * @param appInst
++     * @param conf
++     * @param function
++     * @return evaluation result
++     * @throws Exception
++     */
++    private static String evaluateInstanceFunction(Element event, SyncCoordAction appInst, Configuration conf, 
++            String function) throws Exception {
++        ELEvaluator eval = CoordELEvaluator.createInstancesELEvaluator("coord-action-create-inst", event, appInst, conf);
++        return CoordELFunctions.evalAndWrap(eval, function);
++    }
++
++    public static int parseOneArg(String funcName) throws Exception {
+         int firstPos = funcName.indexOf("(");
+         int lastPos = funcName.lastIndexOf(")");
+         if (firstPos >= 0 && lastPos > firstPos) {
+@@ -166,16 +174,17 @@ public class CoordCommandUtils {
+         Element eStartInst = event.getChild("start-instance", event.getNamespace());
+         Element eEndInst = event.getChild("end-instance", event.getNamespace());
+         if (eStartInst != null && eEndInst != null) {
+-            String strStart = eStartInst.getTextTrim();
+-            String strEnd = eEndInst.getTextTrim();
++            String strStart = evaluateInstanceFunction(event, appInst, conf, eStartInst.getTextTrim());
++            String strEnd = evaluateInstanceFunction(event, appInst, conf, eEndInst.getTextTrim());
++            
+             checkIfBothSameType(strStart, strEnd);
+             StringBuilder restArg = new StringBuilder(); // To store rest
+                                                          // arguments for
+                                                          // future
+                                                          // function
+-            int startIndex = getInstanceNumber(strStart, event, appInst, conf, restArg);
++            int startIndex = getInstanceNumber(strStart, restArg);
+             restArg.delete(0, restArg.length());
+-            int endIndex = getInstanceNumber(strEnd, event, appInst, conf, restArg);
++            int endIndex = getInstanceNumber(strEnd, restArg);
+             if (startIndex > endIndex) {
+                 throw new CommandException(ErrorCode.E1010,
+                         " start-instance should be equal or earlier than the end-instance \n"
+diff --git core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
+index 764ae4b..b22c696 100644
+--- core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
++++ core/src/main/java/org/apache/oozie/coord/CoordELEvaluator.java
+@@ -143,6 +143,9 @@ public class CoordELEvaluator {
+         String strNominalTime = eJob.getAttributeValue("action-nominal-time");
+         if (strNominalTime != null) {
+             appInst.setNominalTime(DateUtils.parseDateUTC(strNominalTime));
++            appInst.setTimeZone(DateUtils.getTimeZone(eJob.getAttributeValue("timezone")));
++            appInst.setFrequency(Integer.parseInt(eJob.getAttributeValue("frequency")));
++            appInst.setTimeUnit(TimeUnit.valueOf(eJob.getAttributeValue("freq_timeunit")));
+             appInst.setActionId(actionId);
+             appInst.setName(eJob.getAttributeValue("name"));
+         }
+diff --git core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java
+index 5c85adb..61f0e04 100644
+--- core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java
++++ core/src/main/java/org/apache/oozie/coord/CoordELFunctions.java
+@@ -39,8 +39,8 @@ import org.apache.oozie.service.HadoopAccessorService;
+  */
+ 
+ public class CoordELFunctions {
+-    final private static String DATASET = "oozie.coord.el.dataset.bean";
+-    final private static String COORD_ACTION = "oozie.coord.el.app.bean";
++    final public static String DATASET = "oozie.coord.el.dataset.bean";
++    final public static String COORD_ACTION = "oozie.coord.el.app.bean";
+     final public static String CONFIGURATION = "oozie.coord.el.conf";
+     // INSTANCE_SEPARATOR is used to separate multiple directories into one tag.
+     final public static String INSTANCE_SEPARATOR = "#";
+@@ -946,7 +946,7 @@ public class CoordELFunctions {
+      * @return current instance i.e. current(0) returns null if effectiveTime is earlier than Initial Instance time of
+      *         the dataset.
+      */
+-    private static Calendar getCurrentInstance(Date effectiveTime, int instanceCount[]) {
++    public static Calendar getCurrentInstance(Date effectiveTime, int instanceCount[]) {
+         Date datasetInitialInstance = getInitialInstance();
+         TimeUnit dsTimeUnit = getDSTimeUnit();
+         TimeZone dsTZ = getDatasetTZ();
+@@ -979,7 +979,7 @@ public class CoordELFunctions {
+         return current;
+     }
+ 
+-    private static Calendar getEffectiveNominalTime() {
++    public static Calendar getEffectiveNominalTime() {
+         Date datasetInitialInstance = getInitialInstance();
+         TimeZone dsTZ = getDatasetTZ();
+         // Convert Date to Calendar for corresponding TZ
+@@ -1027,7 +1027,7 @@ public class CoordELFunctions {
+     /**
+      * @return dataset TimeZone
+      */
+-    private static TimeZone getDatasetTZ() {
++    public static TimeZone getDatasetTZ() {
+         ELEvaluator eval = ELEvaluator.getCurrent();
+         SyncCoordDataset ds = (SyncCoordDataset) eval.getVariable(DATASET);
+         if (ds == null) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/oozie-bundle-el-extension.patch
----------------------------------------------------------------------
diff --git a/oozie-bundle-el-extension.patch b/oozie-bundle-el-extension.patch
new file mode 100644
index 0000000..0f01fcb
--- /dev/null
+++ b/oozie-bundle-el-extension.patch
@@ -0,0 +1,18 @@
+diff --git webapp/pom.xml webapp/pom.xml
+index 38ec438..c3bc9b8 100644
+--- webapp/pom.xml
++++ webapp/pom.xml
+@@ -33,6 +33,13 @@
+ 
+     <dependencies>
+         <dependency>
++            <groupId>org.apache.falcon</groupId>
++            <artifactId>falcon-oozie-el-extension</artifactId>
++            <version>0.3-SNAPSHOT</version>
++            <scope>compile</scope>
++        </dependency>
++
++        <dependency>
+             <groupId>org.apache.oozie</groupId>
+             <artifactId>oozie-core</artifactId>
+             <scope>compile</scope>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/oozie-el-extensions/pom.xml
----------------------------------------------------------------------
diff --git a/oozie-el-extensions/pom.xml b/oozie-el-extensions/pom.xml
new file mode 100644
index 0000000..d06a098
--- /dev/null
+++ b/oozie-el-extensions/pom.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+    
+       http://www.apache.org/licenses/LICENSE-2.0
+        
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.falcon</groupId>
+        <artifactId>falcon-main</artifactId>
+        <version>0.3-SNAPSHOT</version>
+    </parent>
+    <artifactId>falcon-oozie-el-extension</artifactId>
+    <description>Apache Falcon Oozie EL Extension</description>
+    <name>Apache Falcon Oozie EL Extension</name>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.oozie</groupId>
+            <artifactId>oozie-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-core</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>net.sourceforge.findbugs</groupId>
+            <artifactId>annotations</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/61417357/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java
----------------------------------------------------------------------
diff --git a/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java b/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java
new file mode 100644
index 0000000..62b65b2
--- /dev/null
+++ b/oozie-el-extensions/src/main/java/org/apache/oozie/extensions/OozieELExtensions.java
@@ -0,0 +1,386 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.oozie.extensions;
+
+import java.util.Calendar;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.oozie.command.coord.CoordCommandUtils;
+import org.apache.oozie.coord.CoordELEvaluator;
+import org.apache.oozie.coord.CoordELFunctions;
+import org.apache.oozie.coord.SyncCoordAction;
+import org.apache.oozie.coord.SyncCoordDataset;
+import org.apache.oozie.util.DateUtils;
+import org.apache.oozie.util.ELEvaluator;
+import org.apache.oozie.util.ParamChecker;
+import org.apache.oozie.util.XLog;
+import org.jdom.Attribute;
+import org.jdom.Element;
+import org.jdom.Text;
+
+/**
+ * Oozie EL Extensions for falcon.
+ */
+@SuppressWarnings("unchecked")
+//SUSPEND CHECKSTYLE CHECK MethodName
+public final class OozieELExtensions {
+
+    private enum TruncateBoundary {
+        NONE, DAY, MONTH, QUARTER, YEAR
+    }
+
+    public static final String COORD_CURRENT = "coord:current";
+
+    private OozieELExtensions() {
+    }
+
+    public static String ph1_dataIn_echo(String dataInName, String part) {
+        return "dataIn('" + dataInName + "', '" + part + "')";
+    }
+
+    public static String ph3_dataIn(String dataInName, String part) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        String uristr = (String) eval.getVariable(".datain." + dataInName);
+
+        //optional input
+        if (uristr == null) {
+            Element dsEle = getDSElement(eval, dataInName);
+            Configuration conf = new Configuration();
+            SyncCoordAction appInst = (SyncCoordAction) eval.getVariable(CoordELFunctions.COORD_ACTION);
+            try {
+                ELEvaluator instEval = CoordELEvaluator.createInstancesELEvaluator(dsEle, appInst, conf);
+                StringBuilder instances = new StringBuilder();
+                CoordCommandUtils.resolveInstanceRange(dsEle, instances , appInst, conf, instEval);
+                uristr = CoordCommandUtils.createEarlyURIs(dsEle, instances.toString(),
+                        new StringBuilder(), new StringBuilder());
+                uristr = uristr.replace(CoordELFunctions.INSTANCE_SEPARATOR, ",");
+            } catch (Exception e) {
+                throw new RuntimeException("Failed to resolve instance range for " + dataInName, e);
+            }
+        } else {
+            Boolean unresolved = (Boolean) eval.getVariable(".datain." + dataInName + ".unresolved");
+            if (unresolved != null && unresolved) {
+                throw new RuntimeException("There are unresolved instances in " + uristr);
+            }
+        }
+
+        if (StringUtils.isNotEmpty(uristr) && StringUtils.isNotEmpty(part) && !part.equals("null")) {
+            String[] uris = uristr.split(",");
+            StringBuilder mappedUris = new StringBuilder();
+            for (String uri : uris) {
+                if (uri.trim().length() == 0) {
+                    continue;
+                }
+                if (mappedUris.length() > 0) {
+                    mappedUris.append(",");
+                }
+                mappedUris.append(uri).append("/").append(part);
+            }
+            return mappedUris.toString();
+        }
+        return uristr;
+    }
+
+    private static Element getDSElement(ELEvaluator eval, String dataInName) {
+        Element ele = new Element("datain");
+        Element dsEle = new Element("dataset");
+        ele.getChildren().add(dsEle);
+
+        String[] attrs = {"initial-instance", "frequency", "freq_timeunit", "timezone", "end_of_duration"};
+        for (String attr : attrs) {
+            dsEle.getAttributes().add(new Attribute(attr, (String) eval.getVariable(dataInName + "." + attr)));
+        }
+
+        String[] children = {"done-flag", "uri-template"};
+        for (String child : children) {
+            Element childEle = new Element(child);
+            childEle.setContent(new Text(((String) eval.getVariable(dataInName + "." + child)).replace('%', '$')));
+            dsEle.getChildren().add(childEle);
+        }
+
+        String[] eleChildren = {"start-instance", "end-instance"};
+        for (String child : eleChildren) {
+            Element childEle = new Element(child);
+            childEle.setContent(new Text("${" + ((String) eval.getVariable(dataInName + "." + child)) + "}"));
+            ele.getChildren().add(childEle);
+        }
+
+        return ele;
+    }
+
+    public static String ph1_now_echo(int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "now(" + hr + "," + min + ")"; // Unresolved
+    }
+
+    public static String ph1_today_echo(int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "today(" + hr + ", " + min + ")"; // Unresolved
+    }
+
+    public static String ph1_yesterday_echo(int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "yesterday(" + hr + ", " + min + ")"; // Unresolved
+    }
+
+    public static String ph1_currentMonth_echo(int day, int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "currentMonth(" + day + ", " + hr + ", " + min + ")"; // Unresolved
+    }
+
+    public static String ph1_lastMonth_echo(int day, int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "lastMonth(" + day + ", " + hr + ", " + min + ")"; // Unresolved
+    }
+
+    public static String ph1_currentYear_echo(int month, int day, int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "currentYear(" + month + ", " + day + ", " + hr + ", " + min + ")"; // Unresolved
+    }
+
+    public static String ph1_lastYear_echo(int month, int day, int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "lastYear(" + month + ", " + day + ", " + hr + ", " + min + ")"; // Unresolved
+    }
+
+    public static String ph2_now_inst(int hr, int min) {
+        return mapToCurrentInstance(TruncateBoundary.NONE, 0, 0, 0, hr, min);
+    }
+
+    public static String ph2_today_inst(int hr, int min) {
+        return mapToCurrentInstance(TruncateBoundary.DAY, 0, 0, 0, hr, min);
+    }
+
+    public static String ph2_yesterday_inst(int hr, int min) {
+        return mapToCurrentInstance(TruncateBoundary.DAY, 0, 0, -1, hr, min);
+    }
+
+    public static String ph2_currentMonth_inst(int day, int hr, int min) {
+        return mapToCurrentInstance(TruncateBoundary.MONTH, 0, 0, day, hr, min);
+    }
+
+    public static String ph2_lastMonth_inst(int day, int hr, int min) {
+        return mapToCurrentInstance(TruncateBoundary.MONTH, 0, -1, day, hr, min);
+    }
+
+    public static String ph2_currentYear_inst(int month, int day, int hr, int min) {
+        return mapToCurrentInstance(TruncateBoundary.YEAR, 0, month, day, hr, min);
+    }
+
+    public static String ph2_lastYear_inst(int month, int day, int hr, int min) {
+        return mapToCurrentInstance(TruncateBoundary.YEAR, -1, month, day, hr, min);
+    }
+
+    private static String evaluateCurrent(String curExpr) throws Exception {
+        if (curExpr.equals("")) {
+            return curExpr;
+        }
+
+        int inst = CoordCommandUtils.parseOneArg(curExpr);
+        return CoordELFunctions.ph2_coord_current(inst);
+    }
+
+    public static String ph2_now(int hr, int min) throws Exception {
+        if (isDatasetContext()) {
+            String inst = ph2_now_inst(hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.NONE, 0, 0, 0, hr, min);
+        }
+    }
+
+    private static boolean isActionContext() {
+        return !isDatasetContext();
+    }
+
+    private static boolean isDatasetContext() {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        SyncCoordDataset ds = (SyncCoordDataset) eval.getVariable(CoordELFunctions.DATASET);
+        return ds != null;
+    }
+
+    private static String getEffectiveTimeStr(TruncateBoundary trunc, int yr, int mon,
+                                              int day, int hr, int min) throws Exception {
+        Calendar time = getEffectiveTime(trunc, yr, mon, day, hr, min);
+        return DateUtils.formatDateUTC(time);
+    }
+
+    @edu.umd.cs.findbugs.annotations.SuppressWarnings({"SF_SWITCH_FALLTHROUGH"})
+    private static Calendar getEffectiveTime(TruncateBoundary trunc, int yr, int mon, int day, int hr, int min) {
+        Calendar cal;
+        if (isActionContext()) {
+            ELEvaluator eval = ELEvaluator.getCurrent();
+            SyncCoordAction action = ParamChecker.notNull((SyncCoordAction)
+                    eval.getVariable(CoordELFunctions.COORD_ACTION),
+                    "Coordinator Action");
+            cal = Calendar.getInstance(action.getTimeZone());
+            cal.setTime(action.getNominalTime());
+        } else {
+            Calendar tmp = CoordELFunctions.getEffectiveNominalTime();
+            if (tmp == null) {
+                return null;
+            }
+            cal = Calendar.getInstance(CoordELFunctions.getDatasetTZ());
+            cal.setTimeInMillis(tmp.getTimeInMillis());
+        }
+
+        // truncate
+        switch (trunc) {
+        case YEAR:
+            cal.set(Calendar.MONTH, 0);
+
+        case MONTH:
+            cal.set(Calendar.DAY_OF_MONTH, 1);
+
+        case DAY:
+            cal.set(Calendar.HOUR_OF_DAY, 0);
+            cal.set(Calendar.MINUTE, 0);
+            cal.set(Calendar.SECOND, 0);
+            cal.set(Calendar.MILLISECOND, 0);
+            break;
+
+        case NONE: // don't truncate
+            break;
+
+        default:
+            throw new IllegalArgumentException("Truncation boundary " + trunc + " is not supported");
+        }
+
+        // add
+        cal.add(Calendar.YEAR, yr);
+        cal.add(Calendar.MONTH, mon);
+        cal.add(Calendar.DAY_OF_MONTH, day);
+        cal.add(Calendar.HOUR_OF_DAY, hr);
+        cal.add(Calendar.MINUTE, min);
+        return cal;
+    }
+
+    public static String ph2_today(int hr, int min) throws Exception {
+        if (isDatasetContext()) {
+            String inst = ph2_today_inst(hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.DAY, 0, 0, 0, hr, min);
+        }
+    }
+
+    public static String ph2_yesterday(int hr, int min) throws Exception {
+        if (isDatasetContext()) {
+            String inst = ph2_yesterday_inst(hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.DAY, 0, 0, -1, hr, min);
+        }
+    }
+
+    public static String ph2_currentMonth(int day, int hr, int min) throws Exception {
+        if (isDatasetContext()) {
+            String inst = ph2_currentMonth_inst(day, hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.MONTH, 0, 0, day, hr, min);
+        }
+    }
+
+    public static String ph2_lastMonth(int day, int hr, int min) throws Exception {
+        if (isDatasetContext()) {
+            String inst = ph2_lastMonth_inst(day, hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.MONTH, 0, -1, day, hr, min);
+        }
+    }
+
+    public static String ph2_currentYear(int month, int day, int hr, int min) throws Exception {
+        if (isDatasetContext()) {
+            String inst = ph2_currentYear_inst(month, day, hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.YEAR, 0, month, day, hr, min);
+        }
+    }
+
+    public static String ph2_lastYear(int month, int day, int hr, int min) throws Exception {
+        if (isDatasetContext()) {
+            String inst = ph2_lastYear_inst(month, day, hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.YEAR, -1, month, day, hr, min);
+        }
+    }
+
+    /**
+     * Maps the dataset time to coord:current(n) with respect to action's
+     * nominal time dataset time = truncate(nominal time) + yr + day + month +
+     * hr + min.
+     *
+     * @param trunc
+     *            : Truncate resolution
+     * @param yr
+     *            : Year to add (can be -ve)
+     * @param month
+     *            : month to add (can be -ve)
+     * @param day
+     *            : day to add (can be -ve)
+     * @param hr
+     *            : hr to add (can be -ve)
+     * @param min
+     *            : min to add (can be -ve)
+     * @return coord:current(n)
+     * @throws Exception
+     *             : If encountered an exception while evaluating
+     */
+    private static String mapToCurrentInstance(TruncateBoundary trunc, int yr, int month, int day, int hr, int min) {
+        Calendar nominalInstanceCal = CoordELFunctions.getEffectiveNominalTime();
+        if (nominalInstanceCal == null) {
+            XLog.getLog(OozieELExtensions.class).warn(
+                    "If the initial instance of the dataset is later than the nominal time, "
+                            + "an empty string is returned. This means that no data is available "
+                            + "at the current-instance specified by the user and the user could "
+                            + "try modifying his initial-instance to an earlier time.");
+            return "";
+        }
+
+        Calendar dsInstanceCal = getEffectiveTime(trunc, yr, month, day, hr, min);
+
+        int[] instCnt = new int[1];
+        Calendar compInstCal = CoordELFunctions.getCurrentInstance(dsInstanceCal.getTime(), instCnt);
+        if (compInstCal == null) {
+            return "";
+        }
+        int dsInstanceCnt = instCnt[0];
+
+        compInstCal = CoordELFunctions.getCurrentInstance(nominalInstanceCal.getTime(), instCnt);
+        if (compInstCal == null) {
+            return "";
+        }
+        int nominalInstanceCnt = instCnt[0];
+
+        return COORD_CURRENT + "(" + (dsInstanceCnt - nominalInstanceCnt) + ")";
+    }
+}
+//RESUME CHECKSTYLE CHECK MethodName