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:sanjay.subraman...@wizecommerce.com]
Sent: Tuesday, September 03, 2013 02:34 PM
To: user@hive.apache.org <user@hive.apache.org>
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: 李宏展 <lihongzhan...@gmail.com<mailto:lihongzhan...@gmail.com>>
Reply-To: "user@hive.apache.org<mailto:user@hive.apache.org>" 
<user@hive.apache.org<mailto:user@hive.apache.org>>
Date: Tuesday, September 3, 2013 7:43 AM
To: "user@hive.apache.org<mailto:user@hive.apache.org>" 
<user@hive.apache.org<mailto:user@hive.apache.org>>
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.

Reply via email to