> On Aug. 16, 2017, 8:33 p.m., Robert Kanter wrote:
> > client/src/main/resources/hive-action-0.7.xsd
> > Lines 49 (patched)
> > <https://reviews.apache.org/r/61529/diff/2/?file=1796924#file1796924line49>
> >
> >     Can we put CONFIGURATION into oozie-common?
> >     
> >     Same with PREPARE, DELETE, and MKDIR?

Right now I changed oozie-common so that its targetNamespace is 
targetNamespace="uri:oozie:workflow:1.0"
This way common prefix is not needed if ``<launcher>`` is present in the global 
config (include statement can be used).

```
<global>
         <launcher>
                <workflow:memory>1024</workflow:memory>
                <workflow:vcores>2</workflow:vcores>
                <workflow:java-opts>-verbose:class</workflow:java-opts>
                <workflow:env>dummyEnv=42</workflow:env>
                <workflow:queue>dummyQueue</workflow:queue>
            </launcher>
</global>
```

Other actions use the import statement and still need the ``workflow`` prefix 
for the vcore,memory, etc. if they include the ``<launcher>`` element. They 
also need to define workflow namespace with ``xmlns:workflow``.

```
<workflow-app xmlns="uri:oozie:workflow:1.0" 
xmlns:workflow="uri:oozie:workflow:1.0" name="shell-wf">
    <start to="shell-node"/>
    <action name="shell-node">
        <shell xmlns="uri:oozie:shell-action:1.0">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <launcher>
                <workflow:memory>1024</workflow:memory>
                <workflow:vcores>2</workflow:vcores>
                <workflow:java-opts>-verbose:class</workflow:java-opts>
                <workflow:env>dummyEnv=42</workflow:env>
                <workflow:queue>dummyQueue</workflow:queue>
                <workflow:sharelib>a,b,c</workflow:sharelib>
            </launcher>
```

``xs:any`` would require the prefix (like the sla complex type). Using 
``<xs:any namespace="##other" minOccurs="1" maxOccurs="1"/>`` could work, but 
is too permissive - for example you could add any element (e.g. a hive action) 
instead of a ``launcher``.

I am trying to find a better way, but please share if you have some ideas.


- Attila


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


On Sept. 5, 2017, 3:52 p.m., Attila Sasvari wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61529/
> -----------------------------------------------------------
> 
> (Updated Sept. 5, 2017, 3:52 p.m.)
> 
> 
> Review request for oozie and Peter Cseh.
> 
> 
> Repository: oozie-git
> 
> 
> Description
> -------
> 
> New workflow xsd to allow changing launcher configuration (e.g. setting java 
> system properties)
> 
> 
> Diffs
> -----
> 
>   client/src/main/resources/hive-action-1.0.xsd PRE-CREATION 
>   client/src/main/resources/hive2-action-1.0.xsd PRE-CREATION 
>   client/src/main/resources/oozie-common-1.0.xsd PRE-CREATION 
>   client/src/main/resources/oozie-workflow-1.0.xsd PRE-CREATION 
>   client/src/main/resources/shell-action-1.0.xsd PRE-CREATION 
>   client/src/main/resources/spark-action-1.0.xsd PRE-CREATION 
>   client/src/main/resources/sqoop-action-1.0.xsd PRE-CREATION 
>   core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java 
> bca79aa052521ea4f6f16e76bd69f84fb16be790 
>   core/src/main/java/org/apache/oozie/action/hadoop/SqoopActionExecutor.java 
> 8fdc50cce15271c13b20d1aaab2ffb95cb8fa711 
>   core/src/main/java/org/apache/oozie/action/ssh/SshActionExecutor.java 
> 7e3348550e2ef44ae4bd6c5a7a417052bf9c108a 
>   core/src/main/java/org/apache/oozie/jms/MessageReceiver.java 
> 47bfd2bcf9b53eed0882c51cdb5c530e0f6ccfe7 
>   core/src/main/java/org/apache/oozie/service/LiteWorkflowStoreService.java 
> ffc29af2f834da6d0890ea7215c5a62fd7cd693e 
>   core/src/main/java/org/apache/oozie/service/SchemaService.java 
> 137e2c0b4840c6d3858683db1aa38f54bd55be92 
>   core/src/main/java/org/apache/oozie/util/WritableUtils.java 
> aa027e37ba23d4f481698e0bcd93c26c763a0b1f 
>   core/src/main/java/org/apache/oozie/util/schema/Input.java PRE-CREATION 
>   core/src/main/java/org/apache/oozie/util/schema/ResourceResolver.java 
> PRE-CREATION 
>   
> core/src/main/java/org/apache/oozie/workflow/lite/LauncherConfigHandler.java 
> PRE-CREATION 
>   
> core/src/main/java/org/apache/oozie/workflow/lite/LiteWorkflowAppParser.java 
> a74e5c759fe3e336e7e98c61b8f5ac52efa4100c 
>   core/src/main/java/org/apache/oozie/workflow/lite/LiteWorkflowLib.java 
> 23df0867e5984c518e8424d79365997bec28f619 
>   core/src/main/resources/oozie-default.xml 
> 0d174b5069aff36ca3a9d48722c5bba69623a046 
>   
> core/src/test/java/org/apache/oozie/action/hadoop/ActionExecutorTestCase.java 
> d74160a09ee237f4067e00ded526e7ec94528a6b 
>   core/src/test/java/org/apache/oozie/action/hadoop/LauncherMainTester.java 
> 6cee7a8948ca7f2c7aaf44d4f172d18a1308a482 
>   
> core/src/test/java/org/apache/oozie/action/hadoop/TestJavaActionExecutor.java 
> ce674adf9cffa20690083e6298875a6f9047a109 
>   core/src/test/java/org/apache/oozie/service/TestSchemaService.java 
> 88a10dbead32879334c3953a90a411a3a18fc0b3 
>   core/src/test/java/org/apache/oozie/util/TestMetricsInstrumentation.java 
> a882c82b25154338f89e8a90f831b6f0300fbfe7 
>   
> core/src/test/java/org/apache/oozie/workflow/lite/TestLiteWorkflowAppParser.java
>  21332404bea79fe0a3cea045d57b3e52a1f15cae 
>   core/src/test/resources/wf-schema-global-launcherconf-override.xml 
> PRE-CREATION 
>   core/src/test/resources/wf-schema-global-launcherconf.xml PRE-CREATION 
>   sharelib/oozie/src/main/java/org/apache/oozie/action/hadoop/LauncherAM.java 
> 6a98d6ef3a09a7a75272f3f0f9a9c2fc5472e76d 
>   sharelib/pig/src/test/java/org/apache/oozie/action/hadoop/UDFTester.java 
> ff999ff2cd4875fbf3ad5e1a7eacf9972e848630 
> 
> 
> Diff: https://reviews.apache.org/r/61529/diff/3/
> 
> 
> Testing
> -------
> 
> - TestJavaActionExecutor, TestLiteWorkflowAppParser tests passed
> - java-main example on pseudo hadoop succeeded, modified workflow xml so that 
> verbose class loading information is printed out of stdout of the launcher job
> 
> 
> Thanks,
> 
> Attila Sasvari
> 
>

Reply via email to