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 run the oozie job without any configuration error?

Highlighted

how to run the oozie job without any configuration error?

Explorer

Hi all,

I had some problem while running the oozie in Hue dashboard. The problem is after scheduling the pig script in oozie, when I run the script it shows the following configuration error in the oozie dashboard.

" JA009:but conf the top-level element not <configuration> "

I stored the following 3 files in HDFS (/tmp/pig)

1. workflow.xml file

2.test.pig

3.emp.txt

Command:

Workflow.Xml file

<workflow-app
xmlns="uri:oozie:workflow:0.2" name="test">
<start to='pig-node'/>
<action name='pig-node'>
<pig>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<prepare>
</prepare>
<job-xml>workflow.xml</job-xml>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<script>test.pig</script>
</pig>
<ok to="end"/>
<error to="fail"/>
</action>
<kill name="fail">
<message> Action failed, error
message[${wf:errorMessage(wf:lastErrorNode())}] 
</message>
</kill> <end
name="end"/> 
</workflow-app> 

test.pig file

a= LOAD 'emp.txt' USING PigStorage(',') AS (name:chararray,location:chararray,states:chararray);

dump a;

then created emp.txt

rich,remote,sa

ulf,onsite,ca

tom,remote,ch

barry,remote,nv

I gave the hue permission for test.pig ,workflow.xml and emp.txt files in HDFS. After that, in Hue dashboard created the oozie workflow and run the above pig script. The following is the screen shot for the above mentioned error.

4483-jw14v.png

Thanks in advance,

Please share your ideas with me.

3 REPLIES 3

Re: how to run the oozie job without any configuration error?

Super Guru

@Saleema A - I tried to reproduce this issue and here is the working configuration.

<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF licenses this file
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
       http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<workflow-app xmlns="uri:oozie:workflow:0.2" name="pig-wf">
    <start to="pig-node"/>
    <action name="pig-node">
        <pig>
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <prepare>
                <delete path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data/pig"/>
            </prepare>
            <configuration>
                <property>
                    <name>mapred.job.queue.name</name>
                    <value>${queueName}</value>
                </property>
                <property>
                    <name>mapred.compress.map.output</name>
                    <value>true</value>
                </property>
            </configuration>
            <script>test.pig</script>
            <param>INPUT=/user/${wf:user()}/${examplesRoot}/input-data/text</param>
            <param>OUTPUT=/user/${wf:user()}/${examplesRoot}/output-data/pig</param>
        </pig>
        <ok to="end"/>
        <error to="fail"/>
    </action>
    <kill name="fail">
        <message>Pig failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>

Re: how to run the oozie job without any configuration error?

Explorer

thank for your reply kuldeep, but still having the same problem(" JA009:but conf the top-level element not <configuration> "), while running the oozie in Hue dashboard.

workflow.xml

<workflow-app xmlns="uri:oozie:workflow:0.2" name="pig-wf">

<start to="pig-node"/>

<action name="pig-node">

<pig>

<job-tracker>${jobTracker}</job-tracker>

<name-node>${nameNode}</name-node>

<prepare>

<delete path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data/pig"/>

</prepare>

<configuration>

<property>

<name>mapred.job.queue.name</name>

<value>${queueName}</value>

</property>

<property>

<name>mapred.compress.map.output</name>

<value>true</value>

</property>

</configuration>

<script>test.pig</script>

<param>INPUT=/user/${wf:user()}/${examplesRoot}/input-data/text</param>

<param>OUTPUT=/user/${wf:user()}/${examplesRoot}/output-data/pig</param>

</pig>

<ok to="end"/>

<error to="fail"/>

</action>

<kill name="fail">

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

</kill>

<end name="end"/>

</workflow-app>

Re: how to run the oozie job without any configuration error?

Super Guru

@Saleema A - I have tested this workflow on my Oozie.

Can you please run this job via oozie and let me know how it goes?

Don't have an account?
Coming from Hortonworks? Activate your account here