Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Oozie Essentials

You're reading from  Apache Oozie Essentials

Product type Book
Published in Dec 2015
Publisher
ISBN-13 9781785880384
Pages 164 pages
Edition 1st Edition
Languages
Author (1):
Jagat Singh Jagat Singh
Profile icon Jagat Singh

Parameterization of Coordinator jobs


These functions are used to control Datasets, which are used for processing or produced as part of Coordinator processing.

dateOffset(String baseDate, int instance, String timeUnit)

This function calculates the datestamp based on the following calculation:

newDateStamp = baseDateStamp + (instance*timeUnit)

It offsets the baseDateStamp value by the amount given by instance and timeUnit.

The timeUnit value can be one of the following:

  • YEAR

  • MONTH

  • DAY

  • HOUR

  • MINUTE

Consider the following example:

${coord:dateOffset(coord:nominalTime(), 2, 'DAY')}

If nominal time is 2015-08-22T23:00Z, then after the new calculation the output will be 2015- 08-24T23:00Z.

dateTzOffet(String baseDate, String timezone)

This function calculates the datestamp based on the following calculation:

newDateStamp = baseDateStamp + (Oozie Processing Timezone - Given Timezone)

It offsets the baseDateStamp value by the difference from Oozie processing timezone to the timezone passed as argument.

You can...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}