Support Questions

Find answers, ask questions, and share your expertise

Error: E0708 : E0708: Invalid transition, node [fork-node] transition [pig-job]

avatar
Contributor

I want to perform `Oozie` for store `PIG` result into `HIVE` table.

In that, I want to load files from HDFS directory and store result into specific location into HDFS using Oozie. And then I want to process PIG output into HIVE. For that, I have created HIVE and PIG script. But I want to create Oozie workflow to schedule the whole process. SO, I have created following files for Oozie workflow.

`job.properties `

nameNode=hdfs://sandbox.hortonworks.com:8020
jobTracker=sandbox.hortonworks.com:8050
oozie.libpath=${nameNode}/<lib_jar_path>
oozie.wf.application.path=${nameNode}/<working_directory_path> //HDFS Directory
appPath=${nameNode}/<application_path> //HDFS Directory
queueName=default
oozie.use.system.libpath=true
oozie.wf.rerun.failnodes=true
outputDir=${appPath}/output

`workflow.xml`

 <workflow-app name="OozieDemoPigHive" xmlns="uri:oozie:workflow:0.2"> 
  <start to="fork-node"/>
<fork name="fork-node">
        <path start="pig-job" />
        <path start="hive-job" />
    </fork>
    <join name = "join-node" to ="sub-end"/>
<action name="pig-node">
<pig>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
<delete path="${outputDir}"/>
</prepare>
<script>demo.pig</script>
</pig>
<ok to="join-node"/>
<error to="kill"/>
</action>
<action name="hive-node"> 
  <hive xmlns="uri:oozie:hive-action:0.2"> 
  <job-tracker>${jobTracker}</job-tracker> 
  <name-node>${nameNode}</name-node> 
  <job-xml>${appPath}/hive-site.xml</job-xml> 
  <configuration> 
  <property> 
  <name>oozie.hive.defaults</name> 
  <value>${appPath}/hive-site.xml</value> 
  </property> 
  <property> 
  <name>hadoop.proxyuser.oozie.hosts</name> 
  <value>*</value> 
  </property> 
  <property> 
  <name>hadoop.proxyuser.oozie.groups</name> 
  <value>*</value> 
  </property> 
  </configuration> 
  <script>hive.hql</script> 
  </hive> 
  <ok to="join-node"/>
  <error to="kill"/> 
  </action> 
<kill name="kill">
<message>"Killed job due to error: ${wf:errorMessage(wf:lastErrorNode())}"</message>
</kill>
<end name="sub-end"/>
</workflow-app> 

`Oozie job:`

sudo -u oozie oozie job -oozie http://127.0.0.1:11000/oozie -config job.properties -run 

But, When I am executing above job, getting an error like this,

`Error: E0708 : E0708: Invalid transition, node [fork-node] transition [pig-job]`

What am I doing wrong over here? Can anyone assist me?

1 REPLY 1

avatar
Expert Contributor

Both should be same

<pathstart="pig-job"/>

<actionname="pig-node">

Either they should be "pig-node" or "pig-job"