falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srik...@apache.org
Subject git commit: FALCON-554 Extend time functions available in Falcon to support current & last week. Contributed by Srikanth Sundarrajan)
Date Thu, 24 Jul 2014 05:49:18 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 6f40e2a5a -> ed100c8ac


FALCON-554 Extend time functions available in Falcon to support current & last week. 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/ed100c8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/ed100c8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/ed100c8a

Branch: refs/heads/master
Commit: ed100c8ac0b2cc086556fabbf14b2ea3e8424101
Parents: 6f40e2a
Author: srikanth.sundarrajan <srikanth.sundarrajan@inmobi.com>
Authored: Thu Jul 24 11:19:08 2014 +0530
Committer: srikanth.sundarrajan <srikanth.sundarrajan@inmobi.com>
Committed: Thu Jul 24 11:19:08 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                     |   3 +
 build-tools/src/patches/oozie-site.patch        |  82 +++++-----
 docs/src/site/twiki/FalconDocumentation.twiki   |   5 +
 .../oozie/extensions/OozieELExtensions.java     |  70 ++++++++-
 .../oozie/extensions/TestOozieELExtensions.java |  21 +++
 .../src/test/resources/oozie-site.xml           |  14 +-
 webapp/src/conf/oozie/conf/oozie-site.xml       | 155 +++++++++++--------
 7 files changed, 232 insertions(+), 118 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/ed100c8a/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 58f315c..1a53de9 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -8,6 +8,9 @@ Trunk (Unreleased)
    FALCON-263 API to get workflow parameters. (pavan kumar kolamuri via Shwetha GS)
 
   IMPROVEMENTS
+   FALCON-554 Extend time functions available in Falcon to support current & 
+   last week (Contributed by Srikanth Sundarrajan)
+
    FALCON-369 Refactor workflow builder. (Shwetha GS)
 
    FALCON-280 Validate the ACL in Feed entity with the user submitting the entity

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/ed100c8a/build-tools/src/patches/oozie-site.patch
----------------------------------------------------------------------
diff --git a/build-tools/src/patches/oozie-site.patch b/build-tools/src/patches/oozie-site.patch
index e2cc7b9..a368e7f 100644
--- a/build-tools/src/patches/oozie-site.patch
+++ b/build-tools/src/patches/oozie-site.patch
@@ -1,40 +1,14 @@
 --- ./core/src/main/conf/oozie-site.xml
 +++ ./core/src/main/conf/oozie-site.xml
-@@ -375,5 +375,174 @@
-     </property>
+@@ -376,4 +376,162 @@
  
      -->
-+    <!-- HCatalog Integration Properties -->
-+    <property>
-+        <name>oozie.service.ActionService.executor.ext.classes</name>
-+        <value>
-+            org.apache.oozie.action.hadoop.HiveActionExecutor
-+        </value>
-+    </property>
-+
-+    <property>
-+        <name>oozie.service.SchemaService.wf.ext.schemas</name>
-+        <value>hive-action-0.2.xsd</value>
-+    </property>
-+
+ 
 +    <property>
-+        <name>oozie.service.URIHandlerService.uri.handlers</name>
-+        <value>org.apache.oozie.dependency.FSURIHandler,org.apache.oozie.dependency.HCatURIHandler</value>
++        <name>oozie.base.url</name>
++        <value>https://localhost:41443/oozie</value>
 +        <description>
-+            Enlist the different uri handlers supported for data availability checks.
-+        </description>
-+    </property>
-+
-+    <property>
-+        <name>oozie.services.ext</name>
-+        <value>
-+            org.apache.oozie.service.JMSAccessorService,
-+            org.apache.oozie.service.PartitionDependencyManagerService,
-+            org.apache.oozie.service.HCatAccessorService
-+        </value>
-+        <description>
-+            To add/replace services defined in 'oozie.services' with custom implementations.
-+            Class names must be separated by commas.
++            The Oozie base url.
 +        </description>
 +    </property>
 +
@@ -44,26 +18,30 @@
 +            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,
++            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_currentWeek_echo,
++            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_lastWeek_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
++            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
++            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,
++            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek_inst,
++            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek_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,
@@ -75,18 +53,18 @@
 +        </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
++            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,
++            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek,
++            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek,
 +            currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
 +            lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
 +            currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
@@ -98,18 +76,18 @@
 +        </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
++            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,
++            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_currentWeek_echo,
++            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_lastWeek_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,
@@ -122,18 +100,18 @@
 +        </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
++            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,
++            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek,
++            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek,
 +            currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
 +            lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
 +            currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
@@ -148,11 +126,11 @@
 +        </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
++            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>
@@ -163,6 +141,7 @@
 +            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>
@@ -173,5 +152,14 @@
 +            EL functions declarations, separated by commas, format is [PREFIX:]NAME=CLASS#METHOD.
 +        </description>
 +    </property>
- 
++
++    <property>
++        <name>oozie.service.HadoopAccessorService.supported.filesystems</name>
++        <value>hdfs,hftp,webhdfs,jail</value>
++        <description>
++            Enlist the different filesystems supported for federation. If wildcard "*" is
specified, 
++            then ALL file schemes will be allowed.
++        </description>
++    </property>
++
  </configuration>

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/ed100c8a/docs/src/site/twiki/FalconDocumentation.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/FalconDocumentation.twiki b/docs/src/site/twiki/FalconDocumentation.twiki
index 36b989c..267e6d1 100644
--- a/docs/src/site/twiki/FalconDocumentation.twiki
+++ b/docs/src/site/twiki/FalconDocumentation.twiki
@@ -698,6 +698,7 @@ Falcon currently support following ELs:
    * 3.	*yesterday(hours,minutes)*: As the name suggest EL yesterday picks up feed instances
with respect to start of day yesterday. Hours and minutes are added to the 00 hours starting
yesterday, Example: yesterday(24,30) will actually correspond to 00:30 am of today, for 2010-01-02T01:30Z
this would mean 2010-01-02:00:30 feed. 
 
    * 7.	*lastYear(month,day,hour,minute)*: This is exactly similarly to currentYear in usage>
only difference being start reference is taken to start of previous year. For example: lastYear(4,2,2,20)
will correspond to feed instance created at 2009-05-03T02:20Z and lastYear(12,2,2,20) will
correspond to feed at 2010-01-03T02:20Z.
+
    * 4.	*currentMonth(day,hour,minute)*: Current month takes the reference to start of the
month with respect to instance start time. One thing to keep in mind is that day is added
to the first day of the month. So the value of day is the number of days you want to add to
the first day of the month. For example: for instance start time 2010-01-12T01:30Z and El
as currentMonth(3,2,40) will correspond to feed created at 2010-01-04T02:40Z and currentMonth(0,0,0)
will mean 2010-01-01T00:00Z.
 
    * 5.	*lastMonth(day,hour,minute)*: Parameters for lastMonth is same as currentMonth, only
difference being the reference is shifted to one month back. For instance start 2010-01-12T01:30Z
lastMonth(2,3,30) will correspond to feed instance at 2009-12-03:T03:30Z 
@@ -709,6 +710,10 @@ Falcon currently support following ELs:
    
    * 8. *latest(number of latest instance)*: This will simply make you input consider the
number of latest available instance of the feed given as parameter. For example: latest(0)
will consider the last available instance of feed, where as latest latest(-1) will consider
second last available feed and latest(-3) will consider 4th last available feed.
    
+   * 9.	*currentWeek(weekDayName,hour,minute)*: This is similar to currentMonth in the sense
that it returns a relative time with respect to the instance start time, considering the day
name provided as input as the start of the week. The day names can be one of SUN, MON, TUE,
WED, THU, FRI, SAT.
+
+   * 10. *lastWeek(weekDayName,hour,minute)*: This is typically 7 days less than what the
currentWeek returns for similar parameters.
+
 
 ---++ Lineage
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/ed100c8a/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
index d16570b..66385a9 100644
--- 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
@@ -18,12 +18,6 @@
 
 package org.apache.oozie.extensions;
 
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.TimeZone;
-
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.oozie.command.coord.CoordCommandUtils;
@@ -38,6 +32,12 @@ import org.jdom.Attribute;
 import org.jdom.Element;
 import org.jdom.Text;
 
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.TimeZone;
+
 /**
  * Oozie EL Extensions for falcon.
  */
@@ -52,6 +52,10 @@ public final class OozieELExtensions {
         NONE, DAY, MONTH, QUARTER, YEAR
     }
 
+    private enum DayOfWeek {
+        SUN, MON, TUE, WED, THU, FRI, SAT
+    }
+
     public static final String COORD_CURRENT = "coord:current";
 
     private OozieELExtensions() {
@@ -149,6 +153,18 @@ public final class OozieELExtensions {
         return "yesterday(" + hr + ", " + min + ")"; // Unresolved
     }
 
+    public static String ph1_currentWeek_echo(String weekDayName, int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "currentWeek('" + weekDayName + "', " + hr + ", " + min + ")"; // Unresolved
+    }
+
+    public static String ph1_lastWeek_echo(String weekDayName, int hr, int min) {
+        ELEvaluator eval = ELEvaluator.getCurrent();
+        eval.setVariable(".wrap", "true");
+        return "lastWeek('" + weekDayName + "', " + hr + ", " + min + ")"; // Unresolved
+    }
+
     public static String ph1_currentMonth_echo(int day, int hr, int min) {
         ELEvaluator eval = ELEvaluator.getCurrent();
         eval.setVariable(".wrap", "true");
@@ -185,6 +201,16 @@ public final class OozieELExtensions {
         return mapToCurrentInstance(TruncateBoundary.DAY, 0, 0, -1, hr, min);
     }
 
+    public static String ph2_currentWeek_inst(String weekDayName, int hr, int min) {
+        int day = getDayOffset(weekDayName);
+        return mapToCurrentInstance(TruncateBoundary.DAY, 0, 0, day, hr, min);
+    }
+
+    public static String ph2_lastWeek_inst(String weekDayName, int hr, int min) {
+        int day = getDayOffset(weekDayName) - 7;
+        return mapToCurrentInstance(TruncateBoundary.DAY, 0, 0, day, hr, min);
+    }
+
     public static String ph2_currentMonth_inst(int day, int hr, int min) {
         return mapToCurrentInstance(TruncateBoundary.MONTH, 0, 0, day, hr, min);
     }
@@ -337,6 +363,38 @@ public final class OozieELExtensions {
         }
     }
 
+    private static int getDayOffset(String weekDayName) {
+        int day;
+        Calendar nominalTime = CoordELFunctions.getEffectiveNominalTime();
+        int currentWeekDay = nominalTime.get(Calendar.DAY_OF_WEEK);
+        int weekDay = DayOfWeek.valueOf(weekDayName).ordinal() + 1; //to map to Calendar.SUNDAY
...
+        day = weekDay - currentWeekDay;
+        if (weekDay > currentWeekDay) {
+            day = day - 7;
+        }
+        return day;
+    }
+
+    public static String ph2_currentWeek(String weekDayName, int hr, int min) throws Exception
{
+        int day = getDayOffset(weekDayName);
+        if (isDatasetContext()) {
+            String inst = ph2_currentMonth_inst(day, hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.DAY, 0, 0, day, hr, min);
+        }
+    }
+
+    public static String ph2_lastWeek(String weekDayName, int hr, int min) throws Exception
{
+        int day = getDayOffset(weekDayName) - 7;
+        if (isDatasetContext()) {
+            String inst = ph2_lastMonth_inst(day, hr, min);
+            return evaluateCurrent(inst);
+        } else {
+            return getEffectiveTimeStr(TruncateBoundary.DAY, 0, 0, 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);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/ed100c8a/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java
----------------------------------------------------------------------
diff --git a/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java
b/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java
index f2f3dbf..c99a2b3 100644
--- a/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java
+++ b/oozie-el-extensions/src/test/java/org/apache/oozie/extensions/TestOozieELExtensions.java
@@ -154,6 +154,27 @@ public class TestOozieELExtensions {
         Assert.assertEquals("2009-09-02T23:00Z", CoordELFunctions.evalAndWrap(createEval,
getELExpression(instResult)));
     }
 
+    @Test
+    public void testCurrentWeek() throws Exception {
+        initForCurrentThread();
+
+        String expr = "${currentWeek('SUN',0,0)}";
+        String instResult = CoordELFunctions.evalAndWrap(instEval, expr);
+        Assert.assertEquals("2009-08-30T00:00Z", CoordELFunctions.evalAndWrap(createEval,
getELExpression(instResult)));
+
+        expr = "${currentWeek('FRI',1,0)}";
+        instResult = CoordELFunctions.evalAndWrap(instEval, expr);
+        Assert.assertEquals("2009-08-28T01:00Z", CoordELFunctions.evalAndWrap(createEval,
getELExpression(instResult)));
+
+        expr = "${lastWeek('SUN',0,0)}";
+        instResult = CoordELFunctions.evalAndWrap(instEval, expr);
+        Assert.assertEquals("2009-08-23T00:00Z", CoordELFunctions.evalAndWrap(createEval,
getELExpression(instResult)));
+
+        expr = "${lastWeek('MON',0,0)}";
+        instResult = CoordELFunctions.evalAndWrap(instEval, expr);
+        Assert.assertEquals("2009-08-24T00:00Z", CoordELFunctions.evalAndWrap(createEval,
getELExpression(instResult)));
+    }
+
     private String getELExpression(String expr) {
         if (expr != null) {
             return "${" + expr + "}";

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/ed100c8a/oozie-el-extensions/src/test/resources/oozie-site.xml
----------------------------------------------------------------------
diff --git a/oozie-el-extensions/src/test/resources/oozie-site.xml b/oozie-el-extensions/src/test/resources/oozie-site.xml
index cbcc341..a106aa6 100644
--- a/oozie-el-extensions/src/test/resources/oozie-site.xml
+++ b/oozie-el-extensions/src/test/resources/oozie-site.xml
@@ -247,11 +247,15 @@
             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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_currentWeek_echo,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_lastWeek_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
+            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.
@@ -266,6 +270,8 @@
             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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek_inst,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek_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,
@@ -288,6 +294,8 @@
             now=org.apache.oozie.extensions.OozieELExtensions#ph2_now,
             today=org.apache.oozie.extensions.OozieELExtensions#ph2_today,
             yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek,
             currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
             lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
             currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
@@ -310,6 +318,8 @@
             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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_currentWeek_echo,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_lastWeek_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,
@@ -333,6 +343,8 @@
             now=org.apache.oozie.extensions.OozieELExtensions#ph2_now,
             today=org.apache.oozie.extensions.OozieELExtensions#ph2_today,
             yesterday=org.apache.oozie.extensions.OozieELExtensions#ph2_yesterday,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek,
             currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
             lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
             currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/ed100c8a/webapp/src/conf/oozie/conf/oozie-site.xml
----------------------------------------------------------------------
diff --git a/webapp/src/conf/oozie/conf/oozie-site.xml b/webapp/src/conf/oozie/conf/oozie-site.xml
index a43183f..0f25383 100644
--- a/webapp/src/conf/oozie/conf/oozie-site.xml
+++ b/webapp/src/conf/oozie/conf/oozie-site.xml
@@ -22,34 +22,26 @@
         Refer to the oozie-default.xml file for the complete list of
         Oozie configuration properties and their default values.
     -->
+
     <property>
         <name>oozie.service.ActionService.executor.ext.classes</name>
         <value>
             org.apache.oozie.action.email.EmailActionExecutor,
             org.apache.oozie.action.hadoop.HiveActionExecutor,
             org.apache.oozie.action.hadoop.ShellActionExecutor,
-            org.apache.oozie.action.hadoop.SqoopActionExecutor
+            org.apache.oozie.action.hadoop.SqoopActionExecutor,
+            org.apache.oozie.action.hadoop.DistcpActionExecutor
         </value>
     </property>
 
     <property>
         <name>oozie.service.SchemaService.wf.ext.schemas</name>
-        <value>shell-action-0.1.xsd,hive-action-0.2.xsd,sqoop-action-0.2.xsd</value>
-    </property>
-
-   <property>
-        <name>oozie.service.HadoopAccessorService.action.configurations</name>
-        <value>*=${oozie.action.conf}</value>
-        <description>
-            Comma separated AUTHORITY=ACTION_CONF_DIR, where AUTHORITY is the HOST:PORT of
-            the Hadoop MapReduce service (JobTracker, YARN). The wildcard '*' configuration
is
-            used when there is no exact match for an authority. The ACTION_CONF_DIR may contain
-            ACTION.xml files where ACTION is the action type ('java', 'map-reduce', 'pig',
-            'hive', 'sqoop', etc.). If the ACTION.xml file exists, its properties will be
used
-            as defaults properties for the action. If the path is relative is looked within
-            the Oozie configuration directory; though the path can be absolute (i.e. to point
-            to Hadoop client conf/ directories in the local filesystem.
-        </description>
+        <value>
+            shell-action-0.1.xsd,shell-action-0.2.xsd,shell-action-0.3.xsd,email-action-0.1.xsd,hive-action-0.2.xsd,
+            hive-action-0.3.xsd,hive-action-0.4.xsd,hive-action-0.5.xsd,sqoop-action-0.2.xsd,sqoop-action-0.3.xsd,
+            sqoop-action-0.4.xsd,ssh-action-0.1.xsd,ssh-action-0.2.xsd,distcp-action-0.1.xsd,distcp-action-0.2.xsd,
+            oozie-sla-0.1.xsd,oozie-sla-0.2.xsd
+        </value>
     </property>
 
     <property>
@@ -61,18 +53,10 @@
     </property>
 
     <property>
-        <name>oozie.base.url</name>
-        <value>https://localhost:41443/oozie</value>
-        <description>
-            The Oozie system ID.
-        </description>
-    </property>
-
-    <property>
         <name>oozie.systemmode</name>
         <value>NORMAL</value>
         <description>
-            System mode for Oozie at startup.
+            System mode for  Oozie at startup.
         </description>
     </property>
 
@@ -126,13 +110,12 @@
     </property>
 
     <property>
-        <name>oozie.service.coord.normal.default.timeout
-        </name>
-        <value>120</value>
-        <description>Default timeout for a coordinator action input check (in minutes)
for normal job.
-            -1 means infinite timeout
-        </description>
-    </property>
+		<name>oozie.service.coord.normal.default.timeout
+		</name>
+		<value>120</value>
+		<description>Default timeout for a coordinator action input check (in minutes) for
normal job.
+            -1 means infinite timeout</description>
+	</property>
 
     <property>
         <name>oozie.db.schema.name</name>
@@ -184,7 +167,7 @@
             DB user password.
 
             IMPORTANT: if password is emtpy leave a 1 space string, the service trims the
value,
-            if empty Configuration assumes it is NULL.
+                       if empty Configuration assumes it is NULL.
         </description>
     </property>
 
@@ -192,7 +175,7 @@
         <name>oozie.service.JPAService.pool.max.active.conn</name>
         <value>10</value>
         <description>
-            Max number of connections.
+             Max number of connections.
         </description>
     </property>
 
@@ -238,7 +221,7 @@
 
     <property>
         <name>oozie.service.HadoopAccessorService.nameNode.whitelist</name>
-        <value></value>
+        <value> </value>
         <description>
             Whitelisted job tracker for Oozie service.
         </description>
@@ -308,18 +291,18 @@
     </property>
 
     <property>
-        <name>oozie.authentication.cookie.domain</name>
-        <value></value>
-        <description>
-            The domain to use for the HTTP cookie that stores the authentication token.
-            In order to authentiation to work correctly across multiple hosts
-            the domain must be correctly set.
-        </description>
+      <name>oozie.authentication.cookie.domain</name>
+      <value></value>
+      <description>
+        The domain to use for the HTTP cookie that stores the authentication token.
+        In order to authentiation to work correctly across multiple hosts
+        the domain must be correctly set.
+      </description>
     </property>
 
     <property>
         <name>oozie.authentication.simple.anonymous.allowed</name>
-        <value>false</value>
+        <value>true</value>
         <description>
             Indicates if anonymous requests are allowed.
             This setting is meaningful only when using 'simple' authentication.
@@ -353,12 +336,62 @@
         </description>
     </property>
 
+    <!-- Proxyuser Configuration -->
+
+    <!--
+
+    <property>
+        <name>oozie.service.ProxyUserService.proxyuser.#USER#.hosts</name>
+        <value>*</value>
+        <description>
+            List of hosts the '#USER#' user is allowed to perform 'doAs'
+            operations.
+
+            The '#USER#' must be replaced with the username o the user who is
+            allowed to perform 'doAs' operations.
+
+            The value can be the '*' wildcard or a list of hostnames.
+
+            For multiple users copy this property and replace the user name
+            in the property name.
+        </description>
+    </property>
+
+    <property>
+        <name>oozie.service.ProxyUserService.proxyuser.#USER#.groups</name>
+        <value>*</value>
+        <description>
+            List of groups the '#USER#' user is allowed to impersonate users
+            from to perform 'doAs' operations.
+
+            The '#USER#' must be replaced with the username o the user who is
+            allowed to perform 'doAs' operations.
+
+            The value can be the '*' wildcard or a list of groups.
+
+            For multiple users copy this property and replace the user name
+            in the property name.
+        </description>
+    </property>
+
+    -->
+
+    <property>
+        <name>oozie.base.url</name>
+        <value>https://localhost:41443/oozie</value>
+        <description>
+            The Oozie base url.
+        </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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_currentWeek_echo,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_lastWeek_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,
@@ -373,13 +406,14 @@
             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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek_inst,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek_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,
@@ -395,13 +429,14 @@
             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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek,
             currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
             lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
             currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
@@ -417,13 +452,14 @@
             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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_currentWeek_echo,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph1_lastWeek_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,
@@ -440,13 +476,14 @@
             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,
+            currentWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_currentWeek,
+            lastWeek=org.apache.oozie.extensions.OozieELExtensions#ph2_lastWeek,
             currentMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_currentMonth,
             lastMonth=org.apache.oozie.extensions.OozieELExtensions#ph2_lastMonth,
             currentYear=org.apache.oozie.extensions.OozieELExtensions#ph2_currentYear,
@@ -489,22 +526,12 @@
     </property>
 
     <property>
-   		<name>oozie.service.HadoopAccessorService.supported.filesystems</name>
-   		<value>hdfs,hftp,webhdfs,jail</value>
-   		<description>
-   			Enlist the different filesystems supported for federation. If wildcard "*" is specified,
-   			then ALL file schemes will be allowed.
-   		</description>
-   	</property>
-
-    <!-- Proxyuser Configuration -->
-    <property>
-        <name>oozie.service.ProxyUserService.proxyuser.${user.name}.hosts</name>
-        <value>*</value>
-    </property>
-    <property>
-        <name>oozie.service.ProxyUserService.proxyuser.${user.name}.groups</name>
-        <value>*</value>
+        <name>oozie.service.HadoopAccessorService.supported.filesystems</name>
+        <value>hdfs,hftp,webhdfs,jail</value>
+        <description>
+            Enlist the different filesystems supported for federation. If wildcard "*" is
specified,
+            then ALL file schemes will be allowed.
+        </description>
     </property>
 
 </configuration>


Mime
View raw message