[
https://issues.apache.org/jira/browse/OOZIE-674?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205243#comment-13205243
]
[email protected] commented on OOZIE-674:
-----------------------------------------------------
bq. On 2012-02-09 23:59:47, Mohammad Islam wrote:
bq. > At first, I understand that you are mapping your new EL function as
CURRENT. Wandering about the code executed from line 201. Will that work for
you?
bq. >
bq. > Alternatively, what about this proposal.
bq. > getFuncType currently returns the function type based on fixed function
name --> function type mapping.
bq. > We can make it configurable through oozie-default/site.xml. By default,
it will be current-->CURRENT, latest->latest. But it could extended by
overriding the oozie properties in oozie-site.xml.
bq. >
bq. > It could be flexible for future custom EL functions too.
bq. >
bq. > The changes will mainly happen in oozie-default.xml, and getFunctionType
method.
bq. >
bq. > what is you take on this approach?
bq. >
bq. >
Yes, materializeInstance(line 201) works for me. The main reason I mapped to
CURRENT is for getInstanceNumber(). Since coord-action-create-inst context
evaluation returns expression in terms of CURRENT, getInstanceNumber() parses
the CURRENT expression and returns the correct instance number. So,
materializeInstance() just passes that instance number and works fine.
About your proposal, I am ok as long as resolveInstanceRange() works for me.
Its not just getFuncType() which is a problem. You will have to re-look at
getInstanceNumber also, or rather resolveInstanceRange on the whole for EL
functions.
- shwethags
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3752/#review4996
-----------------------------------------------------------
On 2012-02-09 09:26:21, shwethags wrote:
bq.
bq. -----------------------------------------------------------
bq. This is an automatically generated e-mail. To reply, visit:
bq. https://reviews.apache.org/r/3752/
bq. -----------------------------------------------------------
bq.
bq. (Updated 2012-02-09 09:26:21)
bq.
bq.
bq. Review request for oozie.
bq.
bq.
bq. Summary
bq. -------
bq.
bq. I have an EL extension today(0,0) which maps to start day of nominal time.
This is used to specify startInstance, endInstance and instance in dataIn and
dataOut of coordinator.
bq.
bq. In CoordCommandUtils.resolveInstanceRange(), getInstanceNumber has to
return the instance number with respect to current. So, for
coord-action-create-inst context, I have mapped today to current and hence
getInstanceNumber returns the correct number. But later in
resolveInstanceRange(), getFuncType is called with startInstance value which is
today in this case and it maps to UNEXPECTED and throws up. getFuncType should
be passed the evaluation of coord-action-create-inst context
bq.
bq.
bq. This addresses bug OOZIE-674.
bq. https://issues.apache.org/jira/browse/OOZIE-674
bq.
bq.
bq. Diffs
bq. -----
bq.
bq.
trunk/core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
1240005
bq.
bq. Diff: https://reviews.apache.org/r/3752/diff
bq.
bq.
bq. Testing
bq. -------
bq.
bq. UT - TestCoordActionMaterializeCommand
bq. Tested with coord:current instance range and EL extension
bq.
bq.
bq. Thanks,
bq.
bq. shwethags
bq.
bq.
> resolveInstanceRange doesn't work for EL extensions
> ---------------------------------------------------
>
> Key: OOZIE-674
> URL: https://issues.apache.org/jira/browse/OOZIE-674
> Project: Oozie
> Issue Type: Bug
> Reporter: Shwetha G S
> Labels: EL, extension
> Attachments: OOZIE-674.patch
>
>
> I have an EL extension today(0,0) which maps to start day of nominal time.
> This is used to specify startInstance, endInstance and instance in dataIn and
> dataOut of coordinator.
> In CoordCommandUtils.resolveInstanceRange(), getInstanceNumber has to return
> the instance number with respect to current. So, for coord-action-create-inst
> context, I have mapped today to current and hence getInstanceNumber returns
> the correct number. But later in resolveInstanceRange(), getFuncType is
> called with startInstance value which is today in this case and it maps to
> UNEXPECTED and throws up. getFuncType should be passed the evaluation of
> coord-action-create-inst context
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira