> On júl. 21, 2016, 12:51 de, Robert Kanter wrote:
> > core/src/main/java/org/apache/oozie/workflow/lite/LiteWorkflowValidator.java,
> >  line 55
> > <https://reviews.apache.org/r/50202/diff/1/?file=1447527#file1447527line55>
> >
> >     I'm not a big fan of the generic Pair classes.  You loose the context 
> > of what you're storing here (because no member names).  Plus, you can't 
> > easily add additional members later if you need to.
> >     
> >     So I'd recommend replacing Pair with an private inner class (something 
> > like ForkJoinCounter or more generic like BasicValidationContext), and 
> > putting in the two member ints we need.
> >     
> >     Another alternative is to use some class variables for the fork and 
> > join counts and then you don't have to pass them around at all.

I will change this to a mini inner-class with two int fields.


> On júl. 21, 2016, 12:51 de, Robert Kanter wrote:
> > core/src/main/java/org/apache/oozie/workflow/lite/LiteWorkflowValidator.java,
> >  line 164
> > <https://reviews.apache.org/r/50202/diff/1/?file=1447527#file1447527line164>
> >
> >     Can you add some more comments on how this method and its code works?  
> > It's pretty hard to follow what's happening as-is.
> >     
> >     My original code was pretty hard to follow, even with comments :)

Yes, it's something that was on my mind, I just completely forgot about it. 
I'll add enough comments to make things clearer.


> On júl. 21, 2016, 12:51 de, Robert Kanter wrote:
> > core/src/main/java/org/apache/oozie/workflow/lite/LiteWorkflowValidator.java,
> >  line 252
> > <https://reviews.apache.org/r/50202/diff/1/?file=1447527#file1447527line252>
> >
> >     This (uses reflection) to create a new ActionExecutor of the action 
> > type, which we then don't need here.  It would be more efficient to add a 
> > new method to ActionService that checks if a given type is valid.
> >     
> >     Something like this:
> >     ````
> >     boolean hasActionType(String actionType) {
> >         ParamChecker.notEmpty(actionType, "actionType");
> >         return executors.containsKey(actionType);
> >     }
> >     ````
> >     And then simply:
> >     ````
> >     boolean supportedAction = 
> > Services.get().get(ActionService.class).hasActionType(action.getName());
> >     ````

Good idea - will do it.


> On júl. 21, 2016, 12:51 de, Robert Kanter wrote:
> > core/src/test/java/org/apache/oozie/workflow/lite/TestLiteWorkflowAppParser.java,
> >  line 18
> > <https://reviews.apache.org/r/50202/diff/1/?file=1447529#file1447529line18>
> >
> >     It would be good to inclide the Test changes I made in the wip patch I 
> > posted.  It's mostly just some comment clarifications, but there's also a 
> > fancy test for verifying that forkjoin validation doesn't take too long 
> > (the testFoo method, which I forgot to rename).

Yes, will include that.


- Peter


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


On júl. 19, 2016, 7:56 du, Peter Bacsko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50202/
> -----------------------------------------------------------
> 
> (Updated júl. 19, 2016, 7:56 du)
> 
> 
> Review request for oozie.
> 
> 
> Bugs: OOZIE-1978
>     https://issues.apache.org/jira/browse/OOZIE-1978
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> See OOZIE-1978 for details.
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/ErrorCode.java 2907ca2 
>   
> core/src/main/java/org/apache/oozie/workflow/lite/LiteWorkflowAppParser.java 
> a1b9cdb 
>   
> core/src/main/java/org/apache/oozie/workflow/lite/LiteWorkflowValidator.java 
> PRE-CREATION 
>   core/src/test/java/org/apache/oozie/command/wf/TestSubmitXCommand.java 
> 73464c8 
>   
> core/src/test/java/org/apache/oozie/workflow/lite/TestLiteWorkflowAppParser.java
>  9002b6c 
> 
> Diff: https://reviews.apache.org/r/50202/diff/
> 
> 
> Testing
> -------
> 
> Existing tests pass.
> 
> We might need to add some more, at least testing acyclic graph detection.
> 
> 
> Thanks,
> 
> Peter Bacsko
> 
>

Reply via email to