Thanks so much Robert for your help.  Now I am trying to test the custom 
executor sample found here http://www.infoq.com/articles/ExtendingOozie and 
another sample about ftp action for extending Oozie.  In both cases I cannot 
run the test.

Here are the details.



ftpAction.xsd

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";

                xmlns:ftp="uri:custom:ftp-action:0.1" 
elementFormDefault="qualified"

                targetNamespace="uri:custom:ftp-action:0.1">

                <xs:complexType name="ftpType">

                                <xs:sequence>

                                                <xs:element name="serverIP" 
type="xs:string" minOccurs="0"

                                                                maxOccurs="1" />

                                                <xs:element name="port" 
type="xs:string" />

                                                <xs:element name="user" 
type="xs:string" />

                                                <xs:element name="password" 
type="xs:string" />

                                                <xs:element name="targetFile" 
type="xs:string" />

                                                <xs:element name="remoteDir" 
type="xs:string" />

                                                <xs:element name="localeFile" 
type="xs:string" />

                                </xs:sequence>

                </xs:complexType>

                <xs:element name="ftp" type="ftp:ftpType"></xs:element>

</xs:schema>



Conf/oozie-site.xml

I have added class in the oozie.service.ActionService.executor.ext.classes 
entry.

    <property>

        <name>oozie.service.SchemaService.wf.ext.schemas</name>

        <value>

            
shell-action-0.1.xsd,shell-action-0.2.xsd,shell-action-0.3.xsd,email-action-0.1.xsd,hive-action-0.2.xsd,

            
hive-action-0.3.xsd,hive-action-0.4.xsd,hive-action-0.5.xsd,sqoop-action-0.2.xsd,sqoop-action-0.3.xsd,

            
sqoop-action-0.4.xsd,ssh-action-0.1.xsd,ssh-action-0.2.xsd,distcp-action-0.1.xsd,distcp-action-0.2.xsd,

            ftpAction.xsd,emailAction.xsd,oozie-sla-0.1.xsd,oozie-sla-0.2.xsd

        </value>

    </property>

<property>

               
<name>oozie.service.HadoopAccessorService.supported.filesystems</name>

               <value>hdfs,file</value>

   </property>



Job.properties

oozie.wf.application.path=file:///home/cloudera/oozie4.0.1/oozie/workflowTest/workflowftp.xml



workflowftp.xml

<workflow-app name="cluster-wf"

    xmlns="uri:oozie:workflow:0.3"

    xmlns:sla="uri:oozie:sla:0.1">

    <start to="ftp-cluster-results"/>

    <action name="ftp-cluster-results">

        <ftp xlmns="uri:custom:ftp-action:0.1">

            <serverIP>localhost</serverIP>

            <port>21</port>

            <user>anonymous</user>

            <password></password>

            <remoteDir>/pub/fulfillment</remoteDir>

            <localDir>/home/cloudera/test</localDir>

        </ftp>

        <error to="fail"/>

        <ok to="end"/>

    </action>

    <kill name="fail">

        <message>Workflow failed, error 
message[${wf:errorMessage(wf:lastErrorNode())}]</message>

    </kill>

    <end name='end'/>

</workflow-app>



Test:

oozie job -oozie http://localhost:11000/oozie -config job.properties –submit



Error

[root@localhost oozie]# oozie job -oozie http://localhost:11000/oozie -config 
job.properties -submit

Error: E0701 : E0701: XML schema error, cvc-complex-type.2.4.a: Invalid content 
was found starting with element 'ftp'. One of 
'{"uri:oozie:workflow:0.3":map-reduce, "uri:oozie:workflow:0.3":pig, 
"uri:oozie:workflow:0.3":sub-workflow, "uri:oozie:workflow:0.3":fs, 
"uri:oozie:workflow:0.3":java, WC[##other:"uri:oozie:workflow:0.3"]}' is 
expected.



Thanks,



Rachana



-----Original Message-----
From: Robert Kanter [mailto:[email protected]]
Sent: Monday, October 06, 2014 11:37 AM
To: [email protected]
Subject: Re: How to run oozie's workflow.xml standalone in Oozie's execution 
context



Hi,



You should be able to point to a location in the local filesystem by starting 
the path with "file:///<file:///\\>".  For example:

oozie.wf.application.path=file:///some/path/workflow.xml



You'll probably have to add "file" to the 
oozie.service.HadoopAccessorService.supported.filesystems property in 
oozie-site too.



- Robert



On Sun, Oct 5, 2014 at 9:39 PM, Srivastava Rachna - rasriv < 
[email protected]<mailto:[email protected]>> wrote:



> I am trying to find a way to run Oozie workflow outside Hadoop. After

> researching I found that we can write our own custom action executor

> and by making node as synchronous we can execute the Oozie workflow

> within the Oozie execution context.  I am trying to test following

> example of extending Oozie

> http://www.infoq.com/articles/ExtendingOozie stand alone on Tomcat.

> The example mentions that we can write custom action nodes and execute 
> directly inside Oozie execution context without using Hadoop.

>

> But when I looked at different ways of testing and deploying Oozie

> workflow, I cannot find any way to run the workflow without deploying

> workflow.xml on HDFS.

>

> I am looking at different ways to execute oozie workflow, all seems to

> require workflow.xml file to be located in hdfs.

>

> 1.    Command Line Interface: oozie job -oozie ...oozie -dryrun -config

> job.properties To run oozie from CLI workflow application path must be

> specified in the file with the oozie.wf.application.path property. The

> specified path must be an HDFS path.

>

> 2.    JavaClient: We have to specify the location of workflow.xml on hdfs

> conf.setProperty(OozieClient.APP_PATH, " "), here app path needs to be

> hdfs location of workflow.xml.

>

> 3.    LocalOozieExample also needs location of workflow.xml on hdfs

>

> I want to know how to run workflow.xml under Oozie's execute context

> on Tomcat without deploying workflow.xml on hdfs.

>

> Thanks,

>

> Rachana

>

> **********************************************************************

> ***** The information contained in this communication is confidential,

> is intended only for the use of the recipient named above, and may be

> legally privileged.

>

> If the reader of this message is not the intended recipient, you are

> hereby notified that any dissemination, distribution or copying of

> this communication is strictly prohibited.

>

> If you have received this communication in error, please resend this

> communication to the sender and delete the original message or any

> copy of it from your computer system.

>

> Thank You.

>

> **********************************************************************

> ******

>

Reply via email to