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

Peter Bacsko commented on OOZIE-2687:
-------------------------------------

Example of how it would look like:

{code}
<workflow-app xmlns="uri:oozie:workflow:0.3" name="distcp-wf">
    <!--  GLOBAL SETTINGS THAT AFFECTS ALL ACTIONS -->
    <global>
        <launcher>
            <memory>1024</memory>
            <vcores>1</vcores>
            <java-opts>-Dsome.property=true -XX:+RandomJVMSwitch</java-opts>
            <env>key=value</env>
            <queue>root.oozie</queue>
            <sharelib>spark,hive</sharelib>
        </launcher>
    </global>

    <start to="distcp-node"/>
    <action name="distcp-node">
        <distcp xmlns="uri:oozie:distcp-action:0.1">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <prepare>
                <delete 
path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data/${outputDir}"/>
            </prepare>
            <!-- ACTION SPECIFIC SETTINGS -->
            <launcher>
                <memory>1024</memory>
                <vcores>2</vcores>
                <java-opts>-Dsome.property=false</java-opts>
                <env>key=value</env>
                <queue>root.oozie</queue>
                <sharelib>hive</sharelib>
            </launcher>
            <configuration>
                <property>
                    <name>mapred.job.queue.name</name>
                    <value>${queueName}</value>
                </property>
            </configuration>
            <arg>-update</arg>
            <arg>-skipcrccheck</arg>
            
<arg>${nameNode}/user/${wf:user()}/${examplesRoot}/input-data/text/data.txt</arg>
            
<arg>${nameNode}/user/${wf:user()}/${examplesRoot}/output-data/${outputDir}/data.txt</arg>
            </distcp>
        <ok to="end"/>
        <error to="fail"/>
    </action>
    <kill name="fail">
        <message>DistCP failed, error 
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>
{code}

> OYA: Figure out how to handle MR-specific properties
> ----------------------------------------------------
>
>                 Key: OOZIE-2687
>                 URL: https://issues.apache.org/jira/browse/OOZIE-2687
>             Project: Oozie
>          Issue Type: Sub-task
>            Reporter: Peter Cseh
>
> It was possible to manipulate the MapperLauncher's environment through 
> properties like:
> # mapreduce.map.memory.mb     
> # mapreduce.map.cpu.vcores
> # mapred.child.env
> # mapred.child.java.opts      
> # mapred.job.queue.name  - ability to set launcher queue
> E.g. We were using mapred.child.env to pass SPARK_HOME to the LauncherMapper 
> and make PySpark work. 
> Fixing OOZIE-2596 added a hack. We should decide how we support or break 
> compatibility and how we allow the manipulation of the Launcher environment.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to