Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - how to config the job id in oozie


Copy link to this message
-
Re: how to config the job id in oozie
Sanjay Subramanian 2013-09-04, 23:48
Wow that’s a great idea Artem

From: Artem Ervits <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Wednesday, September 4, 2013 5:07 AM
To: "'[EMAIL PROTECTED]<mailto:'[EMAIL PROTECTED]>'" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: Re: how to config the job id in oozie

You can also use shell action to generate timestamp in format you want and pass to the next action as parameter. I do agree it should be easier.
Artem Ervits
Data Analyst
New York Presbyterian Hospital

From: Sanjay Subramanian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2013 02:34 PM
To: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: Re: how to config the job id in oozie

Hi

See here
http://oozie.apache.org/docs/3.2.0-incubating/WorkflowFunctionalSpec.html#a4.2.1_Basic_EL_Constants
String timestamp()

It returns the UTC current date and time in W3C format down to the second (YYYY-MM-DDThh:mm:ss.sZ). I.e.: 1997-07-16T19:20:30.45Z

I don’t like the fact that that there are no Oozie String Format EL functions where u can format the DATE as you want.

See if this works for you . Else you have top pass a param when u submit the Oozie job and append that param to the Oozie workflow ID inside the workflow.XML

oozie job -oozie http://oozie_server:11000/oozie -config job.properties -D START_TIME=$(date +%Y_%m_%dT%H_%M_%S)  -run
Inside your workflow.xml
====================
<property>

  <name>mapreduce.job.name</name>

  <value>MyJobName_${wf:id()}_${START_TIME}</value>

</property>

Thanks

sanjay

From: 李宏展 <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Reply-To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Date: Tuesday, September 3, 2013 7:43 AM
To: "[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>" <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>>
Subject: how to config the job id in oozie

when i submit a workflow,oozie return a jobid like this 0000002-130903214537362-oozie-*.
But in this page http://oozie.apache.org/docs/3.3.2/DG_Examples.html ,the job id is 14-20090525161321-oozie-tucu.

The job id with a date is really useful for me,but How should I config oozie for this?

CONFIDENTIALITY NOTICE
=====================This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.

This electronic message is intended to be for the use only of the named recipient, and may contain information that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately by contacting the sender at the electronic mail address noted above, and delete and destroy all copies of this message. Thank you.

CONFIDENTIALITY NOTICE
=====================This email message and any attachments are for the exclusive use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message along with any attachments, from your computer system. If you are the intended recipient, please be advised that the content of this message is subject to access, review and disclosure by the sender's Email System Administrator.