You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@oozie.apache.org by Thomas Adam <th...@tecbot.de> on 2013/02/15 12:42:30 UTC

Can't add argument to shell action

Hi,

I have the following issue with this action definition:

....

<action name="send_mail">
    <shell xmlns="uri:oozie:shell-action:0.3">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
        <exec>daily_report</exec>
        <file>cmd/daily_report#daily_report</file>
        <argument>send_report</argument>
        <argument>--date=${date}</argument>
    </shell>
    <ok to="end" />
    <error to="kill" />
</action>

...

If I look at the specs of "uri:oozie:shell-action:0.3" the <argument>
node exists, but oozie throws an exception on parsing time:

ERROR org.apache.oozie.command.wf.SubmitXCommand: USER[-] GROUP[-]
TOKEN[-] APP[-] JOB[0000000-130215122701352-oozie-oozi-C]
ACTION[0000000-130215122701352-oozie-oozi-C@1] XException,
org.apache.oozie.command.CommandException: E0701: XML schema error,
cvc-complex-type.2.4.a: Invalid content was found starting with
element 'argument'. One of '{"uri:oozie:shell-action:0.3":file,
"uri:oozie:shell-action:0.3":archive,
"uri:oozie:shell-action:0.3":capture-output}' is expected.

If I remove the <argument> node it works fine.

I use oozie version 3.3.1 with cdh 4.1.2

Thanks & Regards
Thomas

Re: Can't add argument to shell action

Posted by jun aoki <ju...@gmail.com>.
Hi Mohammad, I will be more than happy to include it into Apache oozie
suite! Thank you for your feedback


On Tue, Feb 19, 2013 at 10:56 AM, Mohammad Islam <mi...@yahoo.com> wrote:

> Hi Jun,
> Very good work!
> Do you have ultimate plan to include it into Apache Oozie? If yes, please
> use the Apache compatible tools for easier integration.
>
>
> Btw, the title of the email is misleading. You can correct and resend it
> to get larger attention.
>
> Regards,
> Mohammad
>
>
>
> ________________________________
>  From: jun aoki <ju...@gmail.com>
> To: "user@oozie.apache.org" <us...@oozie.apache.org>; Mohammad Islam <
> mislam77@yahoo.com>
> Sent: Tuesday, February 19, 2013 10:45 AM
> Subject: Re: Can't add argument to shell action
>
> Hi Oozie users,
>
> I have made an online workflow.xml validation tool, I call it VisualOozie.
> http://alpha.visualoozie.cloudbees.net
> (It is still alpha version and buggy though.)
>
> You can file upload workflow.xml files and the tool visualize the
> workflows.
> Try one of the oozie examples from
>
> http://svn.apache.org/viewvc/oozie/trunk/examples/src/main/apps/demo/workflow.xml?view=markup
>
> And it can also identify issues in your workflow.xml files.
> For example, just like in this email thread, some xml mistakes can be
> identified.
>
> PLEASE NOTE that this is my private project and not supported by the Apache
> Oozie team, so if you have any questions/comments/feedback, please send to
> this google groups forum.
> https://groups.google.com/forum/#!forum/visualoozie-user
>
> --------------- EXAMPLE
>
> ------------------------------------------------------------------------------
> <workflow-app xmlns="uri:oozie:workflow:0.4" name="java-main-wf">
>     <start to="shell-node"/>
> <action name="shell-node">
> <shell xmlns="uri:oozie:shell-action:0.3">
> <job-tracker>${jobTracker}</job-tracker>
> <name-node>${nameNode}</name-node>
> <exec>script1.sh</exec>
> <file>script1/file1#file1</file>
> <argument>arg1</argument>
> <argument>arg2=val2</argument>
> </shell>
> <ok to="end" />
> <error to="fail1" />
> </action>
>
>     <kill name="fail1">
>         <message>Java failed, error
> message[${wf:errorMessage(wf:lastErrorNode())}]</message>
>     </kill>
>     <end name="end"/>
> </workflow-app>
>
>
>
>
>
>
>
> On Fri, Feb 15, 2013 at 11:42 AM, Mohammad Islam <mi...@yahoo.com>
> wrote:
>
> > Hi Thomas,
> > "argument" should be just after "exec" tag.
> > Ordering is important too.
> > Please check it here:
> >
> >
> http://oozie.apache.org/docs/3.3.1/DG_ShellActionExtension.html#Shell_Action_Schema_Version_0.2
> >
> > Regards,
> > Mohammad
> >
> >
> >
> >
> > ________________________________
> >  From: Thomas Adam <th...@tecbot.de>
> > To: user@oozie.apache.org
> > Sent: Friday, February 15, 2013 3:42 AM
> > Subject: Can't add argument to shell action
> >
> > Hi,
> >
> > I have the following issue with this action definition:
> >
> > ....
> >
> > <action name="send_mail">
> >     <shell xmlns="uri:oozie:shell-action:0.3">
> >         <job-tracker>${jobTracker}</job-tracker>
> >         <name-node>${nameNode}</name-node>
> >         <exec>daily_report</exec>
> >         <file>cmd/daily_report#daily_report</file>
> >         <argument>send_report</argument>
> >         <argument>--date=${date}</argument>
> >     </shell>
> >     <ok to="end" />
> >     <error to="kill" />
> > </action>
> >
> > ...
> >
> > If I look at the specs of "uri:oozie:shell-action:0.3" the <argument>
> > node exists, but oozie throws an exception on parsing time:
> >
> > ERROR org.apache.oozie.command.wf.SubmitXCommand: USER[-] GROUP[-]
> > TOKEN[-] APP[-] JOB[0000000-130215122701352-oozie-oozi-C]
> > ACTION[0000000-130215122701352-oozie-oozi-C@1] XException,
> > org.apache.oozie.command.CommandException: E0701: XML schema error,
> > cvc-complex-type.2.4.a: Invalid content was found starting with
> > element 'argument'. One of '{"uri:oozie:shell-action:0.3":file,
> > "uri:oozie:shell-action:0.3":archive,
> > "uri:oozie:shell-action:0.3":capture-output}' is expected.
> >
> > If I remove the <argument> node it works fine.
> >
> > I use oozie version 3.3.1 with cdh 4.1.2
> >
> > Thanks & Regards
> > Thomas
> >
>

Re: Can't add argument to shell action

Posted by Mohammad Islam <mi...@yahoo.com>.
Hi Jun,
Very good work!
Do you have ultimate plan to include it into Apache Oozie? If yes, please use the Apache compatible tools for easier integration.


Btw, the title of the email is misleading. You can correct and resend it to get larger attention.

Regards,
Mohammad



________________________________
 From: jun aoki <ju...@gmail.com>
To: "user@oozie.apache.org" <us...@oozie.apache.org>; Mohammad Islam <mi...@yahoo.com> 
Sent: Tuesday, February 19, 2013 10:45 AM
Subject: Re: Can't add argument to shell action
 
Hi Oozie users,

I have made an online workflow.xml validation tool, I call it VisualOozie.
http://alpha.visualoozie.cloudbees.net
(It is still alpha version and buggy though.)

You can file upload workflow.xml files and the tool visualize the workflows.
Try one of the oozie examples from
http://svn.apache.org/viewvc/oozie/trunk/examples/src/main/apps/demo/workflow.xml?view=markup

And it can also identify issues in your workflow.xml files.
For example, just like in this email thread, some xml mistakes can be
identified.

PLEASE NOTE that this is my private project and not supported by the Apache
Oozie team, so if you have any questions/comments/feedback, please send to
this google groups forum.
https://groups.google.com/forum/#!forum/visualoozie-user

--------------- EXAMPLE
------------------------------------------------------------------------------
<workflow-app xmlns="uri:oozie:workflow:0.4" name="java-main-wf">
    <start to="shell-node"/>
<action name="shell-node">
<shell xmlns="uri:oozie:shell-action:0.3">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>script1.sh</exec>
<file>script1/file1#file1</file>
<argument>arg1</argument>
<argument>arg2=val2</argument>
</shell>
<ok to="end" />
<error to="fail1" />
</action>

    <kill name="fail1">
        <message>Java failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>







On Fri, Feb 15, 2013 at 11:42 AM, Mohammad Islam <mi...@yahoo.com> wrote:

> Hi Thomas,
> "argument" should be just after "exec" tag.
> Ordering is important too.
> Please check it here:
>
> http://oozie.apache.org/docs/3.3.1/DG_ShellActionExtension.html#Shell_Action_Schema_Version_0.2
>
> Regards,
> Mohammad
>
>
>
>
> ________________________________
>  From: Thomas Adam <th...@tecbot.de>
> To: user@oozie.apache.org
> Sent: Friday, February 15, 2013 3:42 AM
> Subject: Can't add argument to shell action
>
> Hi,
>
> I have the following issue with this action definition:
>
> ....
>
> <action name="send_mail">
>     <shell xmlns="uri:oozie:shell-action:0.3">
>         <job-tracker>${jobTracker}</job-tracker>
>         <name-node>${nameNode}</name-node>
>         <exec>daily_report</exec>
>         <file>cmd/daily_report#daily_report</file>
>         <argument>send_report</argument>
>         <argument>--date=${date}</argument>
>     </shell>
>     <ok to="end" />
>     <error to="kill" />
> </action>
>
> ...
>
> If I look at the specs of "uri:oozie:shell-action:0.3" the <argument>
> node exists, but oozie throws an exception on parsing time:
>
> ERROR org.apache.oozie.command.wf.SubmitXCommand: USER[-] GROUP[-]
> TOKEN[-] APP[-] JOB[0000000-130215122701352-oozie-oozi-C]
> ACTION[0000000-130215122701352-oozie-oozi-C@1] XException,
> org.apache.oozie.command.CommandException: E0701: XML schema error,
> cvc-complex-type.2.4.a: Invalid content was found starting with
> element 'argument'. One of '{"uri:oozie:shell-action:0.3":file,
> "uri:oozie:shell-action:0.3":archive,
> "uri:oozie:shell-action:0.3":capture-output}' is expected.
>
> If I remove the <argument> node it works fine.
>
> I use oozie version 3.3.1 with cdh 4.1.2
>
> Thanks & Regards
> Thomas
>

Re: Can't add argument to shell action

Posted by jun aoki <ju...@gmail.com>.
Hi Oozie users,

I have made an online workflow.xml validation tool, I call it VisualOozie.
http://alpha.visualoozie.cloudbees.net
(It is still alpha version and buggy though.)

You can file upload workflow.xml files and the tool visualize the workflows.
Try one of the oozie examples from
http://svn.apache.org/viewvc/oozie/trunk/examples/src/main/apps/demo/workflow.xml?view=markup

And it can also identify issues in your workflow.xml files.
For example, just like in this email thread, some xml mistakes can be
identified.

PLEASE NOTE that this is my private project and not supported by the Apache
Oozie team, so if you have any questions/comments/feedback, please send to
this google groups forum.
https://groups.google.com/forum/#!forum/visualoozie-user

--------------- EXAMPLE
------------------------------------------------------------------------------
<workflow-app xmlns="uri:oozie:workflow:0.4" name="java-main-wf">
    <start to="shell-node"/>
 <action name="shell-node">
<shell xmlns="uri:oozie:shell-action:0.3">
 <job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<exec>script1.sh</exec>
 <file>script1/file1#file1</file>
<argument>arg1</argument>
<argument>arg2=val2</argument>
 </shell>
<ok to="end" />
<error to="fail1" />
 </action>

    <kill name="fail1">
        <message>Java failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>







On Fri, Feb 15, 2013 at 11:42 AM, Mohammad Islam <mi...@yahoo.com> wrote:

> Hi Thomas,
> "argument" should be just after "exec" tag.
> Ordering is important too.
> Please check it here:
>
> http://oozie.apache.org/docs/3.3.1/DG_ShellActionExtension.html#Shell_Action_Schema_Version_0.2
>
> Regards,
> Mohammad
>
>
>
>
> ________________________________
>  From: Thomas Adam <th...@tecbot.de>
> To: user@oozie.apache.org
> Sent: Friday, February 15, 2013 3:42 AM
> Subject: Can't add argument to shell action
>
> Hi,
>
> I have the following issue with this action definition:
>
> ....
>
> <action name="send_mail">
>     <shell xmlns="uri:oozie:shell-action:0.3">
>         <job-tracker>${jobTracker}</job-tracker>
>         <name-node>${nameNode}</name-node>
>         <exec>daily_report</exec>
>         <file>cmd/daily_report#daily_report</file>
>         <argument>send_report</argument>
>         <argument>--date=${date}</argument>
>     </shell>
>     <ok to="end" />
>     <error to="kill" />
> </action>
>
> ...
>
> If I look at the specs of "uri:oozie:shell-action:0.3" the <argument>
> node exists, but oozie throws an exception on parsing time:
>
> ERROR org.apache.oozie.command.wf.SubmitXCommand: USER[-] GROUP[-]
> TOKEN[-] APP[-] JOB[0000000-130215122701352-oozie-oozi-C]
> ACTION[0000000-130215122701352-oozie-oozi-C@1] XException,
> org.apache.oozie.command.CommandException: E0701: XML schema error,
> cvc-complex-type.2.4.a: Invalid content was found starting with
> element 'argument'. One of '{"uri:oozie:shell-action:0.3":file,
> "uri:oozie:shell-action:0.3":archive,
> "uri:oozie:shell-action:0.3":capture-output}' is expected.
>
> If I remove the <argument> node it works fine.
>
> I use oozie version 3.3.1 with cdh 4.1.2
>
> Thanks & Regards
> Thomas
>

Re: Can't add argument to shell action

Posted by Mohammad Islam <mi...@yahoo.com>.
Hi Thomas,
"argument" should be just after "exec" tag.
Ordering is important too.
Please check it here:
http://oozie.apache.org/docs/3.3.1/DG_ShellActionExtension.html#Shell_Action_Schema_Version_0.2

Regards,
Mohammad




________________________________
 From: Thomas Adam <th...@tecbot.de>
To: user@oozie.apache.org 
Sent: Friday, February 15, 2013 3:42 AM
Subject: Can't add argument to shell action
 
Hi,

I have the following issue with this action definition:

....

<action name="send_mail">
    <shell xmlns="uri:oozie:shell-action:0.3">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
        <exec>daily_report</exec>
        <file>cmd/daily_report#daily_report</file>
        <argument>send_report</argument>
        <argument>--date=${date}</argument>
    </shell>
    <ok to="end" />
    <error to="kill" />
</action>

...

If I look at the specs of "uri:oozie:shell-action:0.3" the <argument>
node exists, but oozie throws an exception on parsing time:

ERROR org.apache.oozie.command.wf.SubmitXCommand: USER[-] GROUP[-]
TOKEN[-] APP[-] JOB[0000000-130215122701352-oozie-oozi-C]
ACTION[0000000-130215122701352-oozie-oozi-C@1] XException,
org.apache.oozie.command.CommandException: E0701: XML schema error,
cvc-complex-type.2.4.a: Invalid content was found starting with
element 'argument'. One of '{"uri:oozie:shell-action:0.3":file,
"uri:oozie:shell-action:0.3":archive,
"uri:oozie:shell-action:0.3":capture-output}' is expected.

If I remove the <argument> node it works fine.

I use oozie version 3.3.1 with cdh 4.1.2

Thanks & Regards
Thomas