-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3752/#review4996
-----------------------------------------------------------


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?

Alternatively, what about this proposal.
getFuncType currently returns the function type based on fixed  function name 
--> function type mapping.
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.

It could be flexible for future custom EL functions too.

The changes will mainly happen in oozie-default.xml, and getFunctionType 
method. 

what is you take on this approach?

 

- Mohammad


On 2012-02-09 09:26:21, shwethags wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/3752/
> -----------------------------------------------------------
> 
> (Updated 2012-02-09 09:26:21)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> 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 addresses bug OOZIE-674.
>     https://issues.apache.org/jira/browse/OOZIE-674
> 
> 
> Diffs
> -----
> 
>   
> trunk/core/src/main/java/org/apache/oozie/command/coord/CoordCommandUtils.java
>  1240005 
> 
> Diff: https://reviews.apache.org/r/3752/diff
> 
> 
> Testing
> -------
> 
> UT - TestCoordActionMaterializeCommand
> Tested with coord:current instance range and EL extension
> 
> 
> Thanks,
> 
> shwethags
> 
>

Reply via email to