falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandeep Samudrala <sandys...@gmail.com>
Subject Re: Yesterday's date value in Falcon
Date Wed, 05 Aug 2015 14:17:23 GMT
Hi Rishav,
As of now its not supported in falcon to use in  properties. You can use
the following as workaround for now.

<property name="startdayofmonth"
value="${formatTime(dateOffset(instanceTime(), -1,
'MONTH'),'yyyy-MM-dd')}"/>

This workaround has an added advantage that it gives the result in the
required format.

Regards,
-sandeep

On Wed, Aug 5, 2015 at 1:47 PM, Pallavi Rao <pallavi.rao@inmobi.com> wrote:

> Rishav,
> Your config looks fine from what you have mentioned. I tried the same in my
> local dev env. and faced issues too.
>
> For starters, the EL should be specified as ${yesterday(0,0)} in the
> property value for Oozie to treat it as an EL.
>
> Even with that Oozie was somehow unable to resolve it. Will debug further.
> In the meanwhile, if you can file a JIRA, we can track the issue there.
>
> Regards,
> Pallavi
> On Aug 5, 2015 5:50 PM, "Rishav Rohit" <rishav.rohit87@gmail.com> wrote:
>
> > Pallavi,
> >
> > Thanks for prompt response. My $FALCON_INSTALL_DIR/oozie is not having
> > oozie-site.xml, I will check with my hadoop admin. Other configurations
> > look fine
> >
> > 1. Oozie installation has falcon-oozie-el-extension-* under libext and
> > WEB-INF dir -
> > $ find /usr/hdp/2.2.0.0-2041/oozie -name "*falcon-oozie-el-extension-*"
> >
> >
> /usr/hdp/2.2.0.0-2041/oozie/oozie-server/webapps/oozie/WEB-INF/lib/falcon-oozie-el-extension-0.6.0.2.2.0.0-2041.jar
> >
> >
> /usr/hdp/2.2.0.0-2041/oozie/libext/falcon-oozie-el-extension-0.6.0.2.2.0.0-2041.jar
> >
> > 2. I believe property names like oozie.service.ELService.ext.functions.*
> > are the appropriate settings for the EL expression to be resolved, please
> > correct if I am wrong. These are present in my oozie-site,xml
> >
> > 3. $FALCON_INSTALL_DIR/oozie has the jar but not oozie-site.xml
> >
> > *Should we place oozie-site.xml in $FALCON_INSTALL_DIR/oozie/ or
> > $FALCON_INSTALL_DIR/oozi/conf/?*
> > Regards,
> > Rishav
> >
> > > Rishav,
> > > Srikanth just pointed out that I was mistaken. Although Falcon doesn't
> > > evaluate the property values, the EL expressions should be resolved by
> > > Oozie itself. For this to happen, the following has to be place:
> > > 1. Oozie installation must have falcon-oozie-el-extension-*.jar under
> its
> > > libext and also the WAR must have it too.
> > > 2. Oozie's oozie-site.xml must be updated with appropriate settings for
> > the
> > > EL expression to be resolved.
> > >
> > > Both the jar and the sample oozie-site.xml should be available under
> > > $FALCON_INSTALL_DIR/oozie
> > >
> > > Can you please check if the above configuration is taken care of. I
> will
> > > try this out on my dev environment, in the meanwhile.
> > >
> > > Apologies for the confusion,
> > > Regards,
> > > Pallavi
> > >
> > > On Wed, Aug 5, 2015 at 2:25 PM, Pallavi Rao <pallavi.rao@inmobi.com>
> > wrote:
> > >
> > >> Rishav,
> > >> Falcon currently does NOT resolve EL expressions supplied in
> properties.
> > >> The property values are not interpreted in any way by Falcon, they are
> > just
> > >> passed along "as is" to your oozie workflow.
> > >>
> > >> Seems you have a use case for the same. Please file a feature request
> > >> against FALCON and we will evaluate and requirement and pick it up.
> > >>
> > >> Thanks,
> > >> Pallavi
> > >>
> > >> On Wed, Aug 5, 2015 at 12:15 PM, Rishav Rohit <
> rishav.rohit87@gmail.com
> > >
> > >> wrote:
> > >>
> > >>> Hello,
> > >>>
> > >>> I want to schedule a Falcon process which invokes an oozie SSH action
> > >>> workflow, the shell script need yesterday's date as a parameter and
I
> > used
> > >>> below in Falcon process definition -
> > >>>
> > >>> <properties>
> > >>>     <property name="source_type" value="mobile" />
> > >>>     <property name="feed_date" value="yesterday(0,0)" />
> > >>> </properties>
> > >>>
> > >>> but on execution this process throws below error -
> > >>> UNKOWN_ERROR: Not able to execute ssh-base.sh on user@server |
> > >>> ErrorStream:
> > >>> bash: -c: line 0: syntax error near unexpected token `(bash: -c: line
> > 0:
> > >>>
> >
> `oozie-oozi/0007675-150518162055448-oozie-oozi-W/external--ssh/ssh-base.sh
> > >>> FLATTEN_ARGS curl "
> > >>>
> > >>>
> >
> >
> http://server:11000/oozie/callback?id=0007675-150518162055448-oozie-oozi-W@external&status=#status
> > >>> "
> > >>> "--data-binary%%%@
> > >>> #stdout%%%--request%%%POST%%%--header%%%"content-type:text/plain""
> > >>> 0007675-150518162055448-oozie-oozi-W@ex
> > >>>
> > >>> When I tried to run this process without feed_date property it
> executed
> > >>> successfully.
> > >>> Please suggest how canI pass yesterday's date to my Oozie workflow.
> > >>>
> > >>> Regards,
> > >>> Rishav
> > >>>
> >
>
> --
> _____________________________________________________________
> The information contained in this communication is intended solely for the
> use of the individual or entity to whom it is addressed and others
> authorized to receive it. It may contain confidential or legally privileged
> information. If you are not the intended recipient you are hereby notified
> that any disclosure, copying, distribution or taking any action in reliance
> on the contents of this information is strictly prohibited and may be
> unlawful. If you have received this communication in error, please notify
> us immediately by responding to this email and then delete it from your
> system. The firm is neither liable for the proper and complete transmission
> of the information contained in this communication nor for any delay in its
> receipt.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message