[ 
https://issues.apache.org/jira/browse/OOZIE-1204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13570026#comment-13570026
 ] 

jun aoki commented on OOZIE-1204:
---------------------------------

Hi Mona,

<sla:should-end>${ ${SLA_OFFSET} * MINUTES}</sla:should-end>

is not working since the entire text value is passed to commons.el evaluator.

<sla:should-end>${ SLA_OFFSET * MINUTES}</sla:should-end>

should do the job.

I also have a review request to illustrate what I mean with a tweaked test.
https://reviews.apache.org/r/9282/

I believe the user case is invalid and no code change is required.
Let me know if it makes sense.




                
> Can not pass parameters for SLA tags
> ------------------------------------
>
>                 Key: OOZIE-1204
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1204
>             Project: Oozie
>          Issue Type: Improvement
>    Affects Versions: trunk
>            Reporter: Mona Chitnis
>            Assignee: jun aoki
>             Fix For: trunk
>
>
> Can not pass parameter for SLA e.g. through bundle to coordinator
> when passed Property SLA_OFFSET from bundle to cordinator from SLA, running
> the oozie bundle doe not kicks off the coordinator. validation on bundle.xml,
> coordinator.xml passed.
> {code}
> bundle/job.properties
> ..
> MY_SLA_VALUE=10
> ..
>  ------------------- Bundle.xml -----------------     
>     <coordinator>
>    ...
> <property><name>SLA_OFFSET</name><value>${MY_SLA_VALUE}</value></property>
>        </configuration>
>     </coordinator>
> -------------------------- coordinator.xml --------------
>  <sla:info>
>       <sla:app-name>${FEED_NAME}_daily</sla:app-name>
>       <sla:nominal-time>${coord:nominalTime()}</sla:nominal-time>
>       <sla:should-start>${5 * MINUTES}</sla:should-start>
>       <sla:should-end>${ ${SLA_OFFSET} * MINUTES}</sla:should-end>
>       <sla:notification-msg>Notifying User for ${coord:nominalTime()} nominal
> time</sla:notification-msg>
> ----Log -----
>  <sla:info>
>       <sla:app-name>${FEED_NAME}_daily</sla:app-name>
>       <sla:nominal-time>${coord:nominalTime()}</sla:nominal-time>
>       <sla:should-start>${5 * MINUTES}</sla:should-start>
>       <sla:should-end>${${SLA_OFFSET} * MINUTES }</sla:should-end>
>       <sla:notification-msg>Notifying User for ${coord:nominalTime()} nominal
> time</sla:notification-msg>
>     </sla:info>
>   </action>
> </coordinator-app>
> 2013-01-31 19:52:49,923  WARN CoordSubmitXCommand:542 - USER[-] GROUP[-]
> TOKEN[-] APP[-] JOB[123-oozie-wrkf-B] ACTION[-] ERROR:
> org.apache.oozie.command.CommandException: E1004: Expression language
> evaluation error [Validation ERROR :Encountered "{", expected one of ["}", 
> ".",
> ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", 
> "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", ":", "(",
> "?"]], javax.servlet.jsp.el.ELException: Encountered "{", expected one of 
> ["}",
> ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "n
> e", "[", "+", "-", "*", "/", "div", "%", "mod", "and", "&&", "or", "||", ":",
> "(", "?"]
>         at
> org.apache.oozie.command.coord.CoordSubmitXCommand.resolveSLA(CoordSubmitXCommand.java:690)
>         at
> org.apache.oozie.command.coord.CoordSubmitXCommand.resolveInitial(CoordSubmitXCommand.java:666)
>         at
> org.apache.oozie.command.coord.CoordSubmitXCommand.basicResolveAndIncludeDS(CoordSubmitXCommand.java:484)
>         at
> org.apache.oozie.command.coord.CoordSubmitXCommand.submit(CoordSubmitXCommand.java:222)
>         at
> org.apache.oozie.command.SubmitTransitionXCommand.execute(SubmitTransitionXCommand.java:81)
> {code}
> Looks like the SLA's EL Evaluator cannot evaluate the parametrized value. 
> This needs to be fixed

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to