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


The approach is inefficient. Getting the list of coord actions and deleting one 
by one will create big redo logs and also will be time consuming. 
Can you please do a join query to do the delete directly. It will simple, 
efficient in terms of DB load and lot less code as well. Something like

delete from CoordinatorActionBean a where a.id in (select w.parentId from 
WorkflowJobBean w where w.endTimestamp < :endTime and w.parentId is not null)


Can you also make the new query part of CoordActionQueryExecutor? We are not 
writing any new JPAExecutor classes. 

- Rohini Palaniswamy


On Feb. 12, 2014, 5:05 a.m., Srikanth Sundarrajan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17991/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2014, 5:05 a.m.)
> 
> 
> Review request for oozie.
> 
> 
> Bugs: OOZIE-1532
>     https://issues.apache.org/jira/browse/OOZIE-1532
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> Purging should remove completed children job for long running coordinator jobs
> 
> 
> Diffs
> -----
> 
>   core/src/main/java/org/apache/oozie/CoordinatorActionBean.java 03a7ed8 
>   core/src/main/java/org/apache/oozie/WorkflowJobBean.java 3194995 
>   core/src/main/java/org/apache/oozie/command/PurgeXCommand.java 9973719 
>   
> core/src/main/java/org/apache/oozie/executor/jpa/CoordActionsDeleteJPAExecutor.java
>  PRE-CREATION 
>   
> core/src/main/java/org/apache/oozie/executor/jpa/CoordActionsGetForPurgeJPAExecutor.java
>  PRE-CREATION 
>   core/src/test/java/org/apache/oozie/command/TestPurgeXCommand.java 666271e 
>   
> core/src/test/java/org/apache/oozie/executor/jpa/TestCoordActionsDeleteJPAExecutor.java
>  PRE-CREATION 
>   
> core/src/test/java/org/apache/oozie/executor/jpa/TestCoordActionsGetForPurgeJPAExecutor.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/17991/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Srikanth Sundarrajan
> 
>

Reply via email to