Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to execute the workflow.xml in oozie?

How to execute the workflow.xml in oozie?

Hi,

 

I am new to oozie  try to creating a workflow using pigscript and executing it. I don't have clear idea of executing the workflow.

 

My workflow sample is:

 

<workflow-app name="FirstWorkFlow" xmlns="uri:oozie:workflow:0.2">
<start to="FirstJob"/>
<action name="FirstJob">
<pig>
<job-tracker>localhost:8021</job-tracker>
<name-node>hdfs://localhost:8020</name-node>
<script>/FirstScript.pig</script>
</pig>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end" />
</workflow-app>

 

 

and my pigscript is:

 

A = load 'example.csv' using PigStorage(',') as (FILENAME,FILEDATE,SOURCETYPE)

 

when i ran the commnd in the following box this was the error which prompted :

 

java.lang.RuntimeException: bad conf file: top-level element not <configuration>
at org.apache.oozie.cli.OozieCLI.parseDocument(OozieCLI.java:592)
at org.apache.oozie.cli.OozieCLI.parse(OozieCLI.java:577)
at org.apache.oozie.cli.OozieCLI.getConfiguration(OozieCLI.java:647)
at org.apache.oozie.cli.OozieCLI.jobCommand(OozieCLI.java:756)
at org.apache.oozie.cli.OozieCLI.processCommand(OozieCLI.java:512)
at org.apache.oozie.cli.OozieCLI.run(OozieCLI.java:485)
at org.apache.oozie.cli.OozieCLI.main(OozieCLI.java:182)
bad conf file: top-level element not <configuration>

 

can anyone solve this Thanks in advance

 

 

oozie job -oozie http://localhost:11000/oozie -config workflow.xml -submit
1 REPLY 1

Re: How to execute the workflow.xml in oozie?

Master Guru
Please follow this example Oozie tutorial to understand how Oozie and submissions to it work: http://blog.cloudera.com/blog/2013/03/how-to-use-oozie-shell-and-java-actions/

The specific error in your execution is cause of passing the workflow XML as a -config file. This is incorrect.
Don't have an account?
Coming from Hortonworks? Activate your account here