[ 
https://issues.apache.org/jira/browse/OOZIE-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15863663#comment-15863663
 ] 

Attila Sasvari commented on OOZIE-2796:
---------------------------------------

Thanks for the patch [~zhengxb2005]. 
- I executed the {{TestWfEndXCommand}} test, and it passed. It's nice to see 
Mockito in the test!
- I also tested on a pseudo Hadoop cluster that your solution works: 
if {{oozie.action.keep.action.dir=false}} was specified in {{job.properties}}, 
wf directory got deleted; and in case of {{oozie.action.keep.action.dir=true}}, 
wf dir was not deleted. 

Some minor comments:
- In WfEndXCommand you could simplify the else part.  Instead of:
{code}
else {
  if (keepActionDir) {
    LOG.debug("oozie.action.keep.action.dir is set to true");
  }
  else {
    LOG.debug("Tmp dir doesn't exist :" + wfDirPath);
  }
}       
{code}
You could:
{code}
else if (keepActionDir) {
  LOG.debug("oozie.action.keep.action.dir is set to true");
}
else {
  LOG.debug("Tmp dir doesn't exist :" + wfDirPath);
}       
{code}
(-1 nested if-else)

- In the {{TestWfEndXCommand}} test I would:
-- use JUnit annotations (@BeforeClass, @AfterClass, @Test, etc.),
-- extract multiple test cases (using names similar to the comments that 
explain what is being tested) instead of testing everything in one method.

> oozie.action.keep.action.dir not getting noticed
> ------------------------------------------------
>
>                 Key: OOZIE-2796
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2796
>             Project: Oozie
>          Issue Type: Bug
>    Affects Versions: 4.3.0
>            Reporter: Andras Piros
>            Assignee: Xiaobin Zheng
>             Fix For: trunk
>
>         Attachments: OOZIE-2796-1.patch, OOZIE-2796-2.patch
>
>
> When trying to add following configuration entry:
> {code:xml}
> <property>
>     <name>oozie.action.keep.action.dir</name>
>     <value>true</value>
> </property>
> {code}
> to the application level configuration of {{workflow.xml}}, the workflow 
> directories are removed just after the workflow has finished.
> This should not be the case.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to