Mona Chitnis created OOZIE-1204:
-----------------------------------
Summary: 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
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