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

Sumit Gupta commented on KNOX-255:
----------------------------------

The bug complains about closing brackets missing in two spots. The second one 
(getting the job definition) seems to be fixed in the master branch (for 0.5 
release). I reproduced the issue in the sandbox running knox 0.4 and it was 
resolved when running locally using the latest code.

For example, in 0.4 I get back the following excerpt:
<java>
            <job-tracker>${jobTracker</job-tracker>
            <name-node>${nameNode</name-node>
            <main-class>org.apache.hadoop.examples.WordCount</main-class>
            <arg>${inputDir</arg>
            <arg>${outputDir</arg>
        </java>

now I get this (excerpt):

<java>
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <main-class>org.apache.hadoop.examples.WordCount</main-class>
            <arg>${inputDir}</arg>
            <arg>${outputDir}</arg>
        </java>
 

> Incorrect Oozie workflow configuration rewrite when configuration contains 
> path with parameters
> -----------------------------------------------------------------------------------------------
>
>                 Key: KNOX-255
>                 URL: https://issues.apache.org/jira/browse/KNOX-255
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Vladimir Tkhir
>             Fix For: 0.5.0
>
>         Attachments: README, oozie-examples.jar, workflow-configuration.xml, 
> workflow.xml
>
>
> Steps to reproduce:
> Save attached files to /tmp/oozie folder
> # 0. Optionally cleanup the test directory in case a previous example was run 
> without cleaning up.
> curl -i -k -u guest:guest-password -X DELETE \
>     
> 'https://localhost:8443/gateway/sandbox/webhdfs/v1/user/guest/example?op=DELETE&recursive=true'
> # 1. Create the inode for workflow definition file in /user/guest/example
> curl -i -k -u guest:guest-password -X PUT \
>     
> 'https://localhost:8443/gateway/sandbox/webhdfs/v1/user/guest/example/workflow.xml?op=CREATE'
> # 2. Upload the workflow definition file. 
> curl -i -k -u guest:guest-password -T /tmp/oozie/workflow.xml -X PUT \
>     '{Value Location header from command above}'
> # 3. Create the inode for oozie-examples.jar in /user/guest/example/lib
> curl -i -k -u guest:guest-password -X PUT \
>     
> 'https://localhost:8443/gateway/sandbox/webhdfs/v1/user/guest/example/lib/oozie-examples.jar?op=CREATE'
> # 4. Upload oozie-examples.jar to /user/guest/example/lib.
> curl -i -k -u guest:guest-password -T /tmp/oozie/oozie-examples.jar -X PUT \
>     '{Value Location header from command above}'
> # 5. Create the inode for a sample input file readme in 
> /user/guest/example/input.
> curl -i -k -u guest:guest-password -X PUT \
>     
> 'https://localhost:8443/gateway/sandbox/webhdfs/v1/user/guest/example/input/README?op=CREATE'
> # 6. Upload readme.txt to /user/guest/example/input.
> curl -i -k -u guest:guest-password -T /tmp/oozie/README -X PUT \
>     '{Value of Location header from command above}'
> # 7. Submit the job via Oozie
> # Take note of the Job ID in the JSON response as this will be used in the 
> next step.
> curl -ikv -u guest:guest-password -H Content-Type:application/xml -T 
> /tmp/oozie/workflow-configuration.xml \
>     -X POST 
> 'https://localhost:8443/gateway/sandbox/oozie/v1/jobs?action=start'
> Operation finished with error App directory 
> [hdfs:/hdp:8020/user/${user.name/${examplesRoot/apps/map-reduce] does not 
> exist.
> Knox erases closing bracket during rewrite. 
> Also issue with erasing closing brackets appears in response rewrite:
> #curl -ikv -u guest:guest-password -X GET 
> 'https://localhost:8443/gateway/sandbox/oozie/v1/job/{jobId}?show=definition'



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to