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

[email protected] commented on OOZIE-578:
-----------------------------------------------------


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



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellActionExecutor.java
<https://reviews.apache.org/r/3000/#comment8223>

    the argument and env-var lists creation logic could be done in a private 
method and reused for both.
    



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellActionExecutor.java
<https://reviews.apache.org/r/3000/#comment8224>

    these lines would be simpler by doing:
    
    actionConf.setBoolean(ShellMain.CONF_OOZIE_SHELL_CAPTURE_OUTPUT,
        actionXml.getChild("capture-output", ns) != null);



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellActionExecutor.java
<https://reviews.apache.org/r/3000/#comment8225>

    why do we have to add the child env to the launcher, it only should be 
added to the env of the shell we'll start from the ShellMain, no?



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellActionExecutor.java
<https://reviews.apache.org/r/3000/#comment8226>

    these comments seem incorrect



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8227>

    the exec and argumens should be moved to the execute() method, then a 
single param is required to it, the actionConf, and it makes things more 
consistent (all actionConf handling happens in one place)



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8228>

    remove commented code



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8229>

    Here would be where the CWD is added to the PATH, instead doing in 
actionexecutor for the launcher



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8230>

    echoShellOutput should be named 'handleShellOutput', and it could return a 
Thread[], then the threads vars for handling stdout and stderr are local vars 
instead of instance.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8231>

    no need for checking for != null, they never are



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8232>

    tab/trailing-space



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8233>

    this method does not seem to be used.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8235>

    why special handling for HADOOP_TOKEN_FILE_LOCATION, it will be inherited 
by the child process from the current ENV



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8234>

    is this an expected ENV VAR? by whom? using DOTs in it seems dod.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8236>

    remove commented code



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8237>

    the shellactionexecutor should check that all env-var values have an '=', 
and fail if not, then here is always expected an '=' and no need for an if else



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8238>

    this method does not seem used.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8239>

    this method does not seem used



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8240>

    needCapture is not being set to the local var



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8241>

    this is not correct, the file for capture output should be opened outside 
of the while loop that reads the STDOUT (here is being opened on every line)



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
<https://reviews.apache.org/r/3000/#comment8242>

    this method is not being used, remove.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml
<https://reviews.apache.org/r/3000/#comment8243>

    as with the hive, sqoop, and discp extensions, this should be defined in 
the default oozie-site.xml. otherwise it will be in indadvertedly overridden.



http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml
<https://reviews.apache.org/r/3000/#comment8244>

    this is an action extension, it must go in the ext property in the default 
oozie-site.xml (commented out together with sqoop, hive, distcp)


- Alejandro


On 2011-12-07 00:51:10, Mohammad Islam wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3000/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-12-07 00:51:10)
bq.  
bq.  
bq.  Review request for oozie.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  More context at JIRA OOZIE-578.
bq.  
bq.  
bq.  This addresses bug OOZIE-578.
bq.      https://issues.apache.org/jira/browse/OOZIE-578
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/index.twiki
 1209346 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/docs/src/site/twiki/DG_ShellActionExtension.twiki
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellMain.java
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/resources/oozie-default.xml
 1209346 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/ShellTestCase.java
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellActionExecutor.java
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/ShellMain.java
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/client/src/main/java/org/apache/oozie/cli/OozieCLI.java
 1209346 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/client/src/main/resources/shell-action-0.1.xsd
 PRE-CREATION 
bq.    
http://svn.apache.org/repos/asf/incubator/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
 1209346 
bq.  
bq.  Diff: https://reviews.apache.org/r/3000/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Mohammad
bq.  
bq.


                
> Support shell action in Oozie WF
> --------------------------------
>
>                 Key: OOZIE-578
>                 URL: https://issues.apache.org/jira/browse/OOZIE-578
>             Project: Oozie
>          Issue Type: New Feature
>            Reporter: Mohammad Kamrul Islam
>            Assignee: Mohammad Kamrul Islam
>
> Running a script (shell/perl/python/?) from a workflow is a very common 
> use-case. Currently, Oozie user needs to write  a custom java code to execute 
> the script which is not convenient.
> This JIRA is to discuss the feasibility and scope of the feature. The 
> proposed design of this feature will also be included.
>  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to