You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by Srikanth Sundarrajan <sr...@hotmail.com> on 2012/03/08 09:19:24 UTC

Re: Review Request: OOZIE-675 checkMultipleTimeInstances doesn't work for EL extensions. EX: ${coord:formatTime(coord:current(0), 'yyyy-MM-dd')}

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

(Updated 2012-03-08 08:19:24.114428)


Review request for oozie.


Summary (updated)
-------

checkMultipleTimeInstances doesn't work for EL extensions. EX: ${coord:formatTime(coord:current(0),'yyyy-MM-dd')}


This addresses bug OOZIE-675.
    https://issues.apache.org/jira/browse/OOZIE-675


Diffs
-----

  trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java 1297367 
  trunk/core/src/main/java/org/apache/oozie/util/ELEvaluator.java 1297367 
  trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java 1297367 
  trunk/core/src/test/resources/coord-multiple-output-instance4.xml PRE-CREATION 

Diff: https://reviews.apache.org/r/4222/diff


Testing
-------

New test case added to TestCoordSubmitXCommand.java for verifying the changes


Thanks,

Srikanth


Re: Review Request: OOZIE-675 checkMultipleTimeInstances doesn't work for EL extensions. EX: ${coord:formatTime(coord:current(0), 'yyyy-MM-dd')}

Posted by Srikanth Sundarrajan <sr...@hotmail.com>.

> On 2012-03-08 09:01:30, Mohammad Islam wrote:
> > trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java, line 323
> > <https://reviews.apache.org/r/4222/diff/1/?file=88746#file88746line323>
> >
> >     Line 323-330  and line 333-340 look similar.
> >     is it possible to create a method and invoke it from the same place.
> 
> Srikanth Sundarrajan wrote:
>     Yes. Makes sense. Will put up a revised patch shortly

On closer inspection turns out that the correctAction hints and the error messages are different for the scenarios. Have refactored a bit to move the exception handling part for both cases outside of the main method and made it a bit modular.


> On 2012-03-08 09:01:30, Mohammad Islam wrote:
> > trunk/core/src/main/java/org/apache/oozie/util/ELEvaluator.java, line 221
> > <https://reviews.apache.org/r/4222/diff/1/?file=88747#file88747line221>
> >
> >     how to identify this ${func(), func2()}?
> >     that means in one ${ } there are multiple functions.
> 
> Srikanth Sundarrajan wrote:
>     I guess this wont be a valid el expression. I am assuming ExpressionEvaluator would reject it. Will check and confirm.

Added tests in TestELEvaluator to test this case.


- Srikanth


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


On 2012-03-08 15:08:40, Srikanth Sundarrajan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4222/
> -----------------------------------------------------------
> 
> (Updated 2012-03-08 15:08:40)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> checkMultipleTimeInstances doesn't work for EL extensions. EX: ${coord:formatTime(coord:current(0),'yyyy-MM-dd')}
> 
> 
> This addresses bug OOZIE-675.
>     https://issues.apache.org/jira/browse/OOZIE-675
> 
> 
> Diffs
> -----
> 
>   trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java 1297367 
>   trunk/core/src/main/java/org/apache/oozie/util/ELEvaluator.java 1297367 
>   trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java 1297367 
>   trunk/core/src/test/java/org/apache/oozie/util/TestELEvaluator.java 1297367 
>   trunk/core/src/test/resources/coord-multiple-output-instance4.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/4222/diff
> 
> 
> Testing
> -------
> 
> * New test case added to TestCoordSubmitXCommand.java for verifying the changes
> * Added additional test cases to TestELEvaluator.java as well
> 
> 
> Thanks,
> 
> Srikanth
> 
>


Re: Review Request: OOZIE-675 checkMultipleTimeInstances doesn't work for EL extensions. EX: ${coord:formatTime(coord:current(0), 'yyyy-MM-dd')}

Posted by Mohammad Islam <mi...@yahoo.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4222/#review5707
-----------------------------------------------------------



trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java
<https://reviews.apache.org/r/4222/#comment12443>

    Line 323-330  and line 333-340 look similar.
    is it possible to create a method and invoke it from the same place.



trunk/core/src/main/java/org/apache/oozie/util/ELEvaluator.java
<https://reviews.apache.org/r/4222/#comment12445>

    how to identify this ${func(), func2()}?
    that means in one ${ } there are multiple functions.



trunk/core/src/main/java/org/apache/oozie/util/ELEvaluator.java
<https://reviews.apache.org/r/4222/#comment12444>

    is it possible to add one/two unit test case for this new method in TestELEvaluator.jav?  Both cases +ve and -ve.
    This is a critical pieces, hence asking to be more cautious.


- Mohammad


On 2012-03-08 08:19:24, Srikanth Sundarrajan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4222/
> -----------------------------------------------------------
> 
> (Updated 2012-03-08 08:19:24)
> 
> 
> Review request for oozie.
> 
> 
> Summary
> -------
> 
> checkMultipleTimeInstances doesn't work for EL extensions. EX: ${coord:formatTime(coord:current(0),'yyyy-MM-dd')}
> 
> 
> This addresses bug OOZIE-675.
>     https://issues.apache.org/jira/browse/OOZIE-675
> 
> 
> Diffs
> -----
> 
>   trunk/core/src/main/java/org/apache/oozie/command/coord/CoordSubmitXCommand.java 1297367 
>   trunk/core/src/main/java/org/apache/oozie/util/ELEvaluator.java 1297367 
>   trunk/core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java 1297367 
>   trunk/core/src/test/resources/coord-multiple-output-instance4.xml PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/4222/diff
> 
> 
> Testing
> -------
> 
> New test case added to TestCoordSubmitXCommand.java for verifying the changes
> 
> 
> Thanks,
> 
> Srikanth
> 
>