You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Vladimir Tkhir (JIRA)" <ji...@apache.org> on 2014/02/11 14:07:20 UTC

[jira] [Updated] (KNOX-256) Ozzie output/input Dir configuration rewrite rules

     [ https://issues.apache.org/jira/browse/KNOX-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Tkhir updated KNOX-256:
--------------------------------

    Description: 
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'

> Ozzie output/input Dir configuration rewrite rules
> --------------------------------------------------
>
>                 Key: KNOX-256
>                 URL: https://issues.apache.org/jira/browse/KNOX-256
>             Project: Apache Knox
>          Issue Type: Bug
>    Affects Versions: 0.3.0
>            Reporter: Vladimir Tkhir
>             Fix For: 0.4.0
>
>
> 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.1.5#6160)