|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.oozie.coord.CoordELFunctions
public class CoordELFunctions
This class implements the EL function related to coordinator
Field Summary | |
---|---|
static String |
CONFIGURATION
|
static String |
DIR_SEPARATOR
|
static String |
INSTANCE_SEPARATOR
|
static String |
LATEST_EL_USE_CURRENT_TIME
|
Constructor Summary | |
---|---|
CoordELFunctions()
|
Method Summary | |
---|---|
static void |
configureEvaluator(ELEvaluator evaluator,
SyncCoordDataset ds,
SyncCoordAction coordAction)
Configure an evaluator with data set and application specific information. |
static String |
coord_actualTime_echo()
|
static String |
coord_conf(String property)
Return a job configuration property for the coordinator. |
static String |
coord_days_echo(String n)
|
static String |
coord_endOfDay_echo(String n)
|
static String |
coord_endOfMonth_echo(String n)
|
static String |
coord_hours_echo(String n)
|
static String |
coord_minutes_echo(String n)
|
static String |
coord_months_echo(String n)
|
static String |
coord_user()
Return the user that submitted the coordinator job. |
static String |
evalAndWrap(ELEvaluator eval,
String expr)
Helper method to wrap around with "${..}". |
static List<Integer> |
expandOffsetTimes(Calendar startCal,
Calendar endCal,
ELEvaluator eval)
Takes two offset times and returns a list of multiples of the frequency offset from the effective nominal time that occur between them. |
static String |
ph1_coord_actionId_echo()
|
static String |
ph1_coord_actualTime_echo_wrap()
|
static String |
ph1_coord_current_echo(String n)
|
static String |
ph1_coord_dataIn_echo(String n)
|
static String |
ph1_coord_dataOut_echo(String n)
|
static String |
ph1_coord_dateOffset_echo(String n,
String offset,
String unit)
|
static int |
ph1_coord_days(int val)
Used in defining the frequency in 'day' unit. |
static String |
ph1_coord_daysInMonth_echo(String n)
|
static int |
ph1_coord_endOfDays(int val)
Used in defining the frequency in 'day' unit and specify the "end of day" property. |
static int |
ph1_coord_endOfMonths(int val)
Used in defining the frequency in 'month' unit and specify the "end of month" property. |
static String |
ph1_coord_formatTime_echo(String dateTime,
String format)
|
static String |
ph1_coord_future_echo(String n,
String instance)
|
static String |
ph1_coord_futureRange_echo(String start,
String end,
String instance)
|
static int |
ph1_coord_hours(int val)
Used in defining the frequency in 'hour' unit. |
static String |
ph1_coord_hoursInDay_echo(String n)
|
static String |
ph1_coord_latest_echo(String n)
|
static String |
ph1_coord_latestRange_echo(String start,
String end)
|
static int |
ph1_coord_minutes(int val)
Used in defining the frequency in 'minute' unit. |
static int |
ph1_coord_months(int val)
Used in defining the frequency in 'month' unit. |
static String |
ph1_coord_name_echo()
|
static String |
ph1_coord_nominalTime_echo_fixed()
|
static String |
ph1_coord_nominalTime_echo_wrap()
|
static String |
ph1_coord_nominalTime_echo()
|
static String |
ph1_coord_offset_echo(String n,
String timeUnit)
|
static String |
ph1_coord_tzOffset_echo()
|
static String |
ph2_coord_actionId()
Return Action Id. |
static String |
ph2_coord_actualTime()
Return Action Start time. |
static String |
ph2_coord_current_echo(String n)
|
static String |
ph2_coord_current(int n)
Determine the date-time in Oozie processing timezone of n-th dataset instance. |
static String |
ph2_coord_dateOffset(String strBaseDate,
int offset,
String unit)
Returns the a date string while given a base date in 'strBaseDate', offset and unit (e.g. |
static int |
ph2_coord_daysInMonth(int n)
Calculate number of days in one month for n-th dataset instance. |
static String |
ph2_coord_formatTime(String dateTimeStr,
String format)
Convert from standard date-time formatting to a desired format. |
static String |
ph2_coord_future_echo(String n,
String instance)
|
static String |
ph2_coord_futureRange_echo(String start,
String end,
String instance)
|
static int |
ph2_coord_hoursInDay(int n)
Determine how many hours is on the date of n-th dataset instance. |
static String |
ph2_coord_latest_echo(String n)
|
static String |
ph2_coord_latestRange_echo(String start,
String end)
|
static String |
ph2_coord_name()
Return Job Name. |
static String |
ph2_coord_nominalTime()
Return nominal time or Action Creation Time. |
static String |
ph2_coord_offset_echo(String n,
String timeUnit)
|
static String |
ph2_coord_offset(int n,
String timeUnit)
Determine the date-time in Oozie processing timezone of the given offset from the dataset effective nominal time. |
static int |
ph2_coord_tzOffset()
Calculate the difference of timezone offset in minutes between dataset and coordinator job. |
static String |
ph3_coord_actionId()
|
static String |
ph3_coord_actualTime()
|
static String |
ph3_coord_dataIn(String dataInName)
Used to specify a list of URI's that are used as input dir to the workflow job. |
static String |
ph3_coord_dataOut(String dataOutName)
Used to specify a list of URI's that are output dir of the workflow job. |
static String |
ph3_coord_dateOffset(String strBaseDate,
int offset,
String unit)
|
static int |
ph3_coord_daysInMonth(int n)
|
static String |
ph3_coord_formatTime(String dateTimeStr,
String format)
|
static String |
ph3_coord_future(int n,
int instance)
Determine the date-time in Oozie processing timezone of n-th future available dataset instance from nominal Time but not beyond the instance specified as 'instance. |
static String |
ph3_coord_futureRange(int start,
int end,
int instance)
Determine the date-time in Oozie processing timezone of the future available dataset instances from start to end offsets from nominal Time but not beyond the instance specified as 'instance'. |
static int |
ph3_coord_hoursInDay(int n)
|
static String |
ph3_coord_latest(int n)
Determine the date-time in Oozie processing timezone of n-th latest available dataset instance. |
static String |
ph3_coord_latestRange(int start,
int end)
Determine the date-time in Oozie processing timezone of latest available dataset instances from start to end offsets from the nominal time. |
static String |
ph3_coord_name()
|
static String |
ph3_coord_nominalTime()
|
static int |
ph3_coord_tzOffset()
|
static Calendar |
resolveOffsetRawTime(int n,
TimeUnit timeUnit,
ELEvaluator eval)
Resolve the offset time from the effective nominal time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String CONFIGURATION
public static final String LATEST_EL_USE_CURRENT_TIME
public static final String INSTANCE_SEPARATOR
public static final String DIR_SEPARATOR
Constructor Detail |
---|
public CoordELFunctions()
Method Detail |
---|
public static int ph1_coord_days(int val)
val > 0
and should be integer.
val
- frequency in number of days.
public static int ph1_coord_months(int val)
val > 0
and should be integer.
val
- frequency in number of months.
public static int ph1_coord_hours(int val)
val > 0
and should
be integer.
val
- frequency in number of hours.
public static int ph1_coord_minutes(int val)
val > 0
and should be integer.
val
- frequency in number of minutes.
public static int ph1_coord_endOfDays(int val)
val > 0
and should be integer.
val
- frequency in number of days.
public static int ph1_coord_endOfMonths(int val)
val > 0
and should be integer.
val:
- frequency in number of months.
public static int ph2_coord_tzOffset()
public static int ph3_coord_tzOffset()
public static String ph2_coord_dateOffset(String strBaseDate, int offset, String unit) throws Exception
strBaseDate
- -- base dateoffset
- -- any numberunit
- -- DAY, MONTH, HOUR, MINUTE, MONTH
Exception
public static String ph3_coord_dateOffset(String strBaseDate, int offset, String unit) throws Exception
Exception
public static String ph3_coord_future(int n, int instance) throws Exception
n
- :instance count
domain: n >= 0, n is integerinstance:
- How many future instance it should check? value should
be >=0
Exception
public static String ph3_coord_futureRange(int start, int end, int instance) throws Exception
start
- : start instance offset
domain: start >= 0, start is integerend
- : end instance offset
domain: end >= 0, end is integerinstance:
- How many future instance it should check? value should
be >=0
Exception
public static String ph2_coord_nominalTime() throws Exception
Exception
- if unable to format the Date object to Stringpublic static String ph3_coord_nominalTime() throws Exception
Exception
public static String ph2_coord_formatTime(String dateTimeStr, String format) throws Exception
dateTimeStr
- - A timestamp in standard (ISO8601) format.format
- - A string representing the desired format.
Exception
- if unable to format the Date object to Stringpublic static String ph3_coord_formatTime(String dateTimeStr, String format) throws Exception
Exception
public static String ph2_coord_actionId() throws Exception
Exception
public static String ph3_coord_actionId() throws Exception
Exception
public static String ph2_coord_name() throws Exception
Exception
public static String ph3_coord_name() throws Exception
Exception
public static String ph2_coord_actualTime() throws Exception
Exception
- if unable to format the Date object to Stringpublic static String ph3_coord_actualTime() throws Exception
Exception
public static String ph3_coord_dataIn(String dataInName)
dataInName
- : Datain name
public static String ph3_coord_dataOut(String dataOutName)
dataOutName
- : Dataout name
public static String ph2_coord_current(int n) throws Exception
n
- instance count domain: n is integer
Exception
public static String ph2_coord_offset(int n, String timeUnit) throws Exception
1. Data set frequency
2. Data set Time Unit 3. Data set Time zone/DST 4. Data set initial instance 5. Action Creation Time
n
- offset amount (integer)timeUnit
- TimeUnit for offset n ("MINUTE", "HOUR", "DAY", "MONTH", "YEAR")
Exception
- if there was a problem formattingpublic static int ph2_coord_hoursInDay(int n) throws Exception
n
- instance count domain: n is integer
Exception
public static int ph3_coord_hoursInDay(int n) throws Exception
Exception
public static int ph2_coord_daysInMonth(int n) throws Exception
n
- instance count. domain: n is integer
Exception
public static int ph3_coord_daysInMonth(int n) throws Exception
Exception
public static String ph3_coord_latest(int n) throws Exception
n
- :instance count domain: n > 0, n is integer
Exception
public static String ph3_coord_latestRange(int start, int end) throws Exception
start
- :start instance offset domain: start > 0, start is integerend
- :end instance offset domain: end > 0, end is integer
Exception
public static void configureEvaluator(ELEvaluator evaluator, SyncCoordDataset ds, SyncCoordAction coordAction)
evaluator
- : to set variablesds
- : Data Set objectcoordAction
- : Application instancepublic static String evalAndWrap(ELEvaluator eval, String expr) throws Exception
eval
- :EL evaluatorexpr
- : expression to evaluate
Exception
public static String ph1_coord_current_echo(String n)
public static String ph1_coord_offset_echo(String n, String timeUnit)
public static String ph2_coord_current_echo(String n)
public static String ph2_coord_offset_echo(String n, String timeUnit)
public static String ph1_coord_dateOffset_echo(String n, String offset, String unit)
public static String ph1_coord_formatTime_echo(String dateTime, String format)
public static String ph1_coord_latest_echo(String n)
public static String ph2_coord_latest_echo(String n)
public static String ph1_coord_future_echo(String n, String instance)
public static String ph2_coord_future_echo(String n, String instance)
public static String ph1_coord_latestRange_echo(String start, String end)
public static String ph2_coord_latestRange_echo(String start, String end)
public static String ph1_coord_futureRange_echo(String start, String end, String instance)
public static String ph2_coord_futureRange_echo(String start, String end, String instance)
public static String ph1_coord_dataIn_echo(String n)
public static String ph1_coord_dataOut_echo(String n)
public static String ph1_coord_nominalTime_echo()
public static String ph1_coord_nominalTime_echo_wrap()
public static String ph1_coord_nominalTime_echo_fixed()
public static String ph1_coord_actualTime_echo_wrap()
public static String ph1_coord_actionId_echo()
public static String ph1_coord_name_echo()
public static String coord_minutes_echo(String n)
public static String coord_hours_echo(String n)
public static String coord_days_echo(String n)
public static String coord_endOfDay_echo(String n)
public static String coord_months_echo(String n)
public static String coord_endOfMonth_echo(String n)
public static String coord_actualTime_echo()
public static String ph1_coord_hoursInDay_echo(String n)
public static String ph1_coord_daysInMonth_echo(String n)
public static String ph1_coord_tzOffset_echo()
public static String coord_conf(String property)
property
- property name.
null
if the property is undefined.public static String coord_user()
public static List<Integer> expandOffsetTimes(Calendar startCal, Calendar endCal, ELEvaluator eval)
As a simple example, assume its the same day: startCal is 1:00, endCal is 2:00, frequency is 20min, and effective nominal time is 1:20 -- then this method would return a list containing: -20, 0, 20, 40, 60
startCal
- The earlier offset timeendCal
- The later offset timeeval
- The ELEvaluator to use; cannot be null
public static Calendar resolveOffsetRawTime(int n, TimeUnit timeUnit, ELEvaluator eval)
n
- offset amount (integer)timeUnit
- TimeUnit for offset n ("MINUTE", "HOUR", "DAY", "MONTH", "YEAR")eval
- The ELEvaluator to use; or null to use the "current" eval
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |